From 333f61e96fc4200c104478f9fa1714a903418907 Mon Sep 17 00:00:00 2001 From: tracer-ysyx Date: Wed, 10 Jan 2024 16:29:50 +0800 Subject: [PATCH] =?UTF-8?q?>=20build=5Fnpc=5FVSegHandler=5Fnvboard=20=20ys?= =?UTF-8?q?yx=5F22040000=20=E6=9D=8E=E5=BF=83=E6=9D=A8=20=20Linux=20calcit?= =?UTF-8?q?e=206.1.69=20#1-NixOS=20SMP=20PREEMPT=5FDYNAMIC=20Wed=20Dec=202?= =?UTF-8?q?0=2016:00:29=20UTC=202023=20x86=5F64=20GNU/Linux=20=20=2016:29:?= =?UTF-8?q?50=20=20up=202=20days=2015:30,=20=202=20users,=20=20load=20aver?= =?UTF-8?q?age:=201.74,=201.46,=201.37?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- npc/core/src/main/scala/Keyboard.scala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/npc/core/src/main/scala/Keyboard.scala b/npc/core/src/main/scala/Keyboard.scala index 80525c9..e66d705 100644 --- a/npc/core/src/main/scala/Keyboard.scala +++ b/npc/core/src/main/scala/Keyboard.scala @@ -68,10 +68,10 @@ class SegGenerator(seg_count: Int) extends Module { val last_keycode = RegInit(0.U(8.W)) val counter = Counter(0xFF) val digit_to_seg = ((0 until 16).map(_.U)).zip(Seq( - "b00000010".U, "b10011110".U, "b00100100".U, "b00001100".U, - "b10011000".U, "b01001000".U, "b01000000".U, "b00011110".U, - "b00000000".U, "b00001000".U, "b00010000".U, "b11000000".U, - "b01100010".U, "b10000100".U, "b01100000".U, "b01110000".U, + "b00000011".U, "b10011111".U, "b00100101".U, "b00001101".U, + "b10011001".U, "b01001001".U, "b01000001".U, "b00011111".U, + "b00000001".U, "b00001001".U, "b00010001".U, "b11000001".U, + "b01100011".U, "b10000101".U, "b01100001".U, "b01110001".U, )) val keycode_to_ascii = (((0x41 to 0x5A) ++ (0x30 to 0x39)).map(_.U)).zip(Seq( @@ -92,7 +92,7 @@ class SegGenerator(seg_count: Int) extends Module { val count_digits = VecInit(counter.value(3,0)) ++ VecInit(counter.value(7,4)) val count_seg = count_digits.map(MuxLookup(_, 0xFF.U)(digit_to_seg)) - seg_regs := Seq(0xFF.U, 0xFF.U) ++ count_seg ++ ascii_seg ++ keycode_seg + seg_regs := count_seg ++ ascii_seg ++ keycode_seg ++ Seq(0xFF.U, 0xFF.U) io.segs := seg_regs }