diff options
| author | Colin Schmidt | 2016-05-11 15:19:59 -0700 |
|---|---|---|
| committer | Colin Schmidt | 2016-05-11 15:19:59 -0700 |
| commit | 345c85942a8a34eb3da0b0dee71921ce39bba822 (patch) | |
| tree | 9e495a4a9f8cb36bf47c4bf615e7fc7269a206d3 | |
| parent | 3ae577bc710b3767f47403a3d055e84815a30043 (diff) | |
| parent | acb04d052c9244f59ab382da569cd71b54a40256 (diff) | |
Merge pull request #184 from ucb-bar/fix-regnext
RegNext and RegInit should match Reg(next=) and Reg(init=)
| -rw-r--r-- | src/main/scala/Chisel/util/Reg.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/scala/Chisel/util/Reg.scala b/src/main/scala/Chisel/util/Reg.scala index 44593dfd..6584a4bf 100644 --- a/src/main/scala/Chisel/util/Reg.scala +++ b/src/main/scala/Chisel/util/Reg.scala @@ -7,15 +7,15 @@ package Chisel object RegNext { - def apply[T <: Data](next: T): T = Reg[T](next, next, null.asInstanceOf[T]) + def apply[T <: Data](next: T): T = Reg[T](null.asInstanceOf[T], next, null.asInstanceOf[T]) - def apply[T <: Data](next: T, init: T): T = Reg[T](next, next, init) + def apply[T <: Data](next: T, init: T): T = Reg[T](null.asInstanceOf[T], next, init) } object RegInit { - def apply[T <: Data](init: T): T = Reg[T](init, null.asInstanceOf[T], init) + def apply[T <: Data](init: T): T = Reg[T](null.asInstanceOf[T], null.asInstanceOf[T], init) } |
