scanner: rewrite fuer key-pressed only. TODO: testbench
[hwmod.git] / src / beh_scanner_tb.vhd
index f0704d5fe64b7544e5ec818f4286d96a2026867c..f5a0a34ad7d023a7f8f37b0c85666f19ec936c8c 100644 (file)
@@ -80,14 +80,11 @@ begin
                                variable y : boolean;
                begin
                        case x is
-                               -- nur gueltig wenn davor ein numpad-mod byte gekommen ist
-                               when SC_KP_DIV => y := last = x"e0";
-
-                               -- immer gueltig
                                when SC_KP_0 | SC_KP_1 | SC_KP_2 | SC_KP_3 |
                                        SC_KP_4 | SC_KP_5 | SC_KP_6 | SC_KP_7 |
                                        SC_KP_8 | SC_KP_9 | SC_KP_PLUS |
-                                       SC_KP_MINUS | SC_KP_MUL | SC_SPACE |
+                                       SC_KP_MINUS | SC_KP_MUL |
+                                       SC_KP_DIV | SC_SPACE |
                                        SC_BKSP | SC_ENTER =>
                                                y := true;
                                when others => y := false;
@@ -179,10 +176,10 @@ begin
                                end if;
 
                                new_data <= '1';
+
                                case input(j) is
                                        when nul => data <= ascii2sc(x"1c"); -- $ (enter)
                                        when '!' => data <= ascii2sc(x"0e"); -- ! (backspace)
-                                       when '.' => data <= x"e0"; -- . (modifier fuer Numpad)
                                        when others => data <= ascii2sc(std_logic_vector(to_unsigned(character'pos(input(j)),8)));
                                end case;
                                icwait(sys_clk, 1);