diff options
| author | Jim Lawson | 2016-07-20 13:28:15 -0700 |
|---|---|---|
| committer | Jim Lawson | 2016-07-20 13:28:15 -0700 |
| commit | 28e80311f172ae4d1d477e8bb47ca3719c9a8fc5 (patch) | |
| tree | 5d7a077498317c5f2412604380acc43c6b1fc371 /src/main/scala/chisel3/util/Valid.scala | |
| parent | f81202b896d30d90075be487895befa009b11733 (diff) | |
Compile ok.
Need to convert UInt(x) into UInt.Lit(x) or UInt.width(x)
Diffstat (limited to 'src/main/scala/chisel3/util/Valid.scala')
| -rw-r--r-- | src/main/scala/chisel3/util/Valid.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/scala/chisel3/util/Valid.scala b/src/main/scala/chisel3/util/Valid.scala index 4078a76a..5641f0f2 100644 --- a/src/main/scala/chisel3/util/Valid.scala +++ b/src/main/scala/chisel3/util/Valid.scala @@ -13,7 +13,11 @@ class Valid[+T <: Data](gen: T) extends Bundle val valid = Output(Bool()) val bits = Output(gen.cloneType) def fire(dummy: Int = 0): Bool = valid - override def cloneType: this.type = Valid(gen).asInstanceOf[this.type] + override def cloneType: this.type = { + val clone = Valid(gen).asInstanceOf[this.type] + clone.unBind() + clone + } } /** Adds a valid protocol to any interface */ |
