> 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 15:33:27 up 2 days 14:34, 2 users, load average: 5.23, 2.91, 2.08
This commit is contained in:
parent
d4f0936612
commit
8a539713b6
1 changed files with 4 additions and 16 deletions
|
@ -68,22 +68,10 @@ class SegGenerator(seg_count: Int) extends Module {
|
||||||
val last_keycode = RegInit(0.U(8.W))
|
val last_keycode = RegInit(0.U(8.W))
|
||||||
val counter = Counter(0xFF)
|
val counter = Counter(0xFF)
|
||||||
val digit_to_seg = ((0 until 16).map(_.U)).zip(Seq(
|
val digit_to_seg = ((0 until 16).map(_.U)).zip(Seq(
|
||||||
"b11111101".U, // 0
|
"b00000010".U, "b10011111".U, "b00100101".U, "b00001101".U,
|
||||||
"b01100000".U, // 1
|
"b10011001".U, "b01001001".U, "b01000001".U, "b00011111".U,
|
||||||
"b11011010".U, // 2
|
"b00000001".U, "b00001001".U, "b00010001".U, "b11000001".U,
|
||||||
"b11110010".U, // 3
|
"b01100011".U, "b10000101".U, "b01100001".U, "b01110001".U
|
||||||
"b01100110".U, // 4
|
|
||||||
"b10110110".U, // 5
|
|
||||||
"b10111110".U, // 6
|
|
||||||
"b11100000".U, // 7
|
|
||||||
"b11111110".U, // 8
|
|
||||||
"b11110110".U, // 9
|
|
||||||
"b11101110".U, // A
|
|
||||||
"b00111110".U, // B
|
|
||||||
"b10011100".U, // C
|
|
||||||
"b01111010".U, // D
|
|
||||||
"b10011110".U, // E
|
|
||||||
"b10001110".U // F
|
|
||||||
))
|
))
|
||||||
|
|
||||||
val keycode_digits = VecInit(io.keycode.bits(3,0)) ++ VecInit(io.keycode.bits(7,4))
|
val keycode_digits = VecInit(io.keycode.bits(3,0)) ++ VecInit(io.keycode.bits(7,4))
|
||||||
|
|
Loading…
Reference in a new issue