diff --git a/npc/core/src/main/scala/SegGenerator.scala b/npc/core/src/main/scala/SegGenerator.scala index ecdb4a6..56e65b8 100644 --- a/npc/core/src/main/scala/SegGenerator.scala +++ b/npc/core/src/main/scala/SegGenerator.scala @@ -41,6 +41,9 @@ class SegGenerator(seg_count: Int) extends Module { }.elsewhen(!release_state) { keycode := io.keycode.bits counter.inc() + }.otherwise{ + // Release code on io.keycode.bits + release_state := false.B } }