diff options
| author | jackbackrack | 2015-07-24 11:55:48 -0700 |
|---|---|---|
| committer | jackbackrack | 2015-07-24 11:55:48 -0700 |
| commit | 523abfdf49a3af747b2243a46415dc7a817154e4 (patch) | |
| tree | babdf70f5a91e5137dc18f06dc6f959160bf20cc /src/main/scala/utils.scala | |
| parent | ea31aa07364fd41e54d6426395a7cc390a525703 (diff) | |
change to use doCloneType for users, add collectElts, get rid of delayedInit
Diffstat (limited to 'src/main/scala/utils.scala')
| -rw-r--r-- | src/main/scala/utils.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/scala/utils.scala b/src/main/scala/utils.scala index 4135d92b..3bbea34a 100644 --- a/src/main/scala/utils.scala +++ b/src/main/scala/utils.scala @@ -280,7 +280,7 @@ class ValidIO[+T <: Data](gen2: T) extends Bundle val valid = Bool(OUTPUT) val bits = gen2.cloneType.asOutput def fire(dummy: Int = 0): Bool = valid - override def cloneType: this.type = new ValidIO(gen2).asInstanceOf[this.type] + override def doCloneType: this.type = new ValidIO(gen2).asInstanceOf[this.type] } /** Adds a valid protocol to any interface. The standard used is @@ -296,7 +296,7 @@ class DecoupledIO[+T <: Data](gen: T) extends Bundle val valid = Bool(OUTPUT) val bits = gen.cloneType.asOutput def fire(dummy: Int = 0): Bool = ready && valid - override def cloneType: this.type = new DecoupledIO(gen).asInstanceOf[this.type] + override def doCloneType: this.type = new DecoupledIO(gen).asInstanceOf[this.type] } /** Adds a ready-valid handshaking protocol to any interface. @@ -315,7 +315,7 @@ class EnqIO[T <: Data](gen: T) extends DecoupledIO(gen) for (io <- bits.flatten) io := UInt(0) } - override def cloneType: this.type = { new EnqIO(gen).asInstanceOf[this.type]; } + override def doCloneType: this.type = { new EnqIO(gen).asInstanceOf[this.type]; } } class DeqIO[T <: Data](gen: T) extends DecoupledIO(gen) @@ -325,7 +325,7 @@ class DeqIO[T <: Data](gen: T) extends DecoupledIO(gen) ready := Bool(false) } def deq(b: Boolean = false): T = { ready := Bool(true); bits } - override def cloneType: this.type = { new DeqIO(gen).asInstanceOf[this.type]; } + override def doCloneType: this.type = { new DeqIO(gen).asInstanceOf[this.type]; } } |
