correctly initialize the active flag

This commit is contained in:
Yunsup Lee authored and Yunsup Lee committed 2016-10-03 17:56:30 -07:00
1 parent 6ec2e7c5bd
commit 62954d543e
1 file changed
+1 -1
+1 -1
View File
@@ -45,7 +45,7 @@ class SimpleTimer(initCount: Int) extends Module {
}
val countdown = Reg(UInt(width = log2Up(initCount)))
val active = Reg(Bool())
val active = Reg(init = Bool(false))
when (active) { countdown := countdown - UInt(1) }