scanner: rewrite fuer key-pressed only. TODO: testbench
[hwmod.git] / src / beh_scanner_tb.vhd
index e904d76024c941a461b090932b5742f68b5403ab..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;
@@ -127,7 +124,7 @@ begin
                        f1_loop : while not endfile(f) loop
                                readline (f, l);
                                input := (others => nul);
-                               if (l'length <= 71) then
+                               if (l'length <= 72) then
                                        input(1 to l'length) := l.all;
                                        if (input(1) = '#') then
                                                next f1_loop;
@@ -143,7 +140,7 @@ begin
                        f2_loop : while not endfile(f) loop
                                readline (f, l);
                                expectedresult := (others => nul);
-                               if (l'length <= 71) then
+                               if (l'length <= 72) then
                                        expectedresult(1 to l'length) := l.all;
                                        if (expectedresult(1) = '#') then
                                                next f2_loop;
@@ -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);