summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSchuyler Eldridge2016-10-13 09:46:54 -0400
committerSchuyler Eldridge2016-10-13 09:46:54 -0400
commita9abc29aae7dc8aab0df803e2b97620b0b5b1aea (patch)
treef0e447d96966b9048ffde45f4545511bf31e8e11 /src
parentbd78bb4ae8f7f6efd0abc76cb7942739de6b2da1 (diff)
Add cloneType method to QueueIO
Candidate fix for #245
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/chisel3/util/Decoupled.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/scala/chisel3/util/Decoupled.scala b/src/main/scala/chisel3/util/Decoupled.scala
index a0cbf4f7..c9d57759 100644
--- a/src/main/scala/chisel3/util/Decoupled.scala
+++ b/src/main/scala/chisel3/util/Decoupled.scala
@@ -145,6 +145,8 @@ class QueueIO[T <: Data](gen: T, entries: Int) extends Bundle
val deq = EnqIO(gen)
/** The current amount of data in the queue */
val count = Output(UInt.width(log2Up(entries + 1)))
+
+ override def cloneType = new QueueIO(gen, entries).asInstanceOf[this.type]
}
/** A hardware module implementing a Queue