correctly initialize the active flag
This commit is contained in:
parent
6ec2e7c5bd
commit
62954d543e
@ -45,7 +45,7 @@ class SimpleTimer(initCount: Int) extends Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val countdown = Reg(UInt(width = log2Up(initCount)))
|
val countdown = Reg(UInt(width = log2Up(initCount)))
|
||||||
val active = Reg(Bool())
|
val active = Reg(init = Bool(false))
|
||||||
|
|
||||||
when (active) { countdown := countdown - UInt(1) }
|
when (active) { countdown := countdown - UInt(1) }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user