> build_npc_VSegHandler_nvboard
ysyx_22040000 李心杨 Linux calcite 6.1.69 #1-NixOS SMP PREEMPT_DYNAMIC Wed Dec 20 16:00:29 UTC 2023 x86_64 GNU/Linux 16:27:51 up 2 days 15:28, 2 users, load average: 1.80, 1.42, 1.35
This commit is contained in:
parent
336a2d1c27
commit
3ce159ac56
1 changed files with 4 additions and 4 deletions
|
@ -85,14 +85,14 @@ class SegGenerator(seg_count: Int) extends Module {
|
|||
|
||||
val keycode = io.keycode.bits
|
||||
val keycode_digits = VecInit(keycode(3,0)) ++ VecInit(keycode(7,4))
|
||||
val keycode_seg = keycode_digits.map(MuxLookup(_, 0.U)(digit_to_seg))
|
||||
val keycode_seg = keycode_digits.map(MuxLookup(_, 0xFF.U)(digit_to_seg))
|
||||
val ascii = MuxLookup(keycode, 0.U)(keycode_to_ascii)
|
||||
val ascii_digits = VecInit(ascii(3,0)) ++ VecInit(ascii(6,4))
|
||||
val ascii_seg = ascii_digits.map(MuxLookup(_, 0.U)(digit_to_seg))
|
||||
val ascii_seg = ascii_digits.map(MuxLookup(_, 0xFF.U)(digit_to_seg))
|
||||
val count_digits = VecInit(counter.value(3,0)) ++ VecInit(counter.value(7,4))
|
||||
val count_seg = count_digits.map(MuxLookup(_, 0.U)(digit_to_seg))
|
||||
val count_seg = count_digits.map(MuxLookup(_, 0xFF.U)(digit_to_seg))
|
||||
|
||||
seg_regs := Seq(0.U, 0.U) ++ count_seg ++ ascii_seg ++ keycode_seg
|
||||
seg_regs := Seq(0xFF.U, 0xFF.U) ++ count_seg ++ ascii_seg ++ keycode_seg
|
||||
|
||||
io.segs := seg_regs
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue