diff options
| author | Jim Lawson | 2016-07-21 17:12:06 -0700 |
|---|---|---|
| committer | Jim Lawson | 2016-07-21 17:12:06 -0700 |
| commit | 7c9043859994b32bb07d2fce4ae61a7a3362a1b3 (patch) | |
| tree | 0f307e975393adf246e59aae0cc1b626e4ab4c7c /src/main/scala/chisel3/util/Decoupled.scala | |
| parent | d269818bdd4f2b71abebfaba9d7f8c9b4d488688 (diff) | |
Introduce chiselCloneType to distinguish from cloneType.
Still fails one test - DirectionSpec in Direction.scala
Diffstat (limited to 'src/main/scala/chisel3/util/Decoupled.scala')
| -rw-r--r-- | src/main/scala/chisel3/util/Decoupled.scala | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/scala/chisel3/util/Decoupled.scala b/src/main/scala/chisel3/util/Decoupled.scala index 037f9a22..76bf4842 100644 --- a/src/main/scala/chisel3/util/Decoupled.scala +++ b/src/main/scala/chisel3/util/Decoupled.scala @@ -12,7 +12,7 @@ class DecoupledIO[+T <: Data](gen: T) extends Bundle { val ready = Input(Bool()) val valid = Output(Bool()) - val bits = Output(gen.cloneType) + val bits = Output(gen.chiselCloneType) override def cloneType: this.type = DecoupledIO(gen).asInstanceOf[this.type] } @@ -59,9 +59,7 @@ object DecoupledIO { } } // override def cloneType: this.type = { -// val clone = DeqIO(gen).asInstanceOf[this.type] -// clone.unBind() -// clone +// DeqIO(gen).asInstanceOf[this.type] // } } @@ -171,7 +169,7 @@ extends Module(override_reset=override_reset) { object Queue { def apply[T <: Data](enq: DecoupledIO[T], entries: Int = 2, pipe: Boolean = false): DecoupledIO[T] = { - val q = Module(new Queue(enq.bits.cloneType, entries, pipe)) + val q = Module(new Queue(enq.bits.chiselCloneType, entries, pipe)) q.io.enq.valid := enq.valid // not using <> so that override is allowed q.io.enq.bits := enq.bits enq.ready := q.io.enq.ready |
