summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Lawson2016-10-24 11:31:15 -0700
committerGitHub2016-10-24 11:31:15 -0700
commita44c7aede6902533ea79fcf6a3fbed234b4456c0 (patch)
tree284e7f90895b43e5367d2276f56c6da9dc01236a /src
parentae62ebe5e826c55eacaeaa83a4e6db975ab5d8a1 (diff)
parenta9abc29aae7dc8aab0df803e2b97620b0b5b1aea (diff)
Merge pull request #246 from seldridge/issue-245
Add a cloneType method to QueueIO
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