diff options
| author | Schuyler Eldridge | 2016-10-13 09:46:54 -0400 |
|---|---|---|
| committer | Schuyler Eldridge | 2016-10-13 09:46:54 -0400 |
| commit | a9abc29aae7dc8aab0df803e2b97620b0b5b1aea (patch) | |
| tree | f0e447d96966b9048ffde45f4545511bf31e8e11 | |
| parent | bd78bb4ae8f7f6efd0abc76cb7942739de6b2da1 (diff) | |
Add cloneType method to QueueIO
Candidate fix for #245
| -rw-r--r-- | src/main/scala/chisel3/util/Decoupled.scala | 2 |
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 |
