X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fbeh_scanner_tb.vhd;fp=src%2Fbeh_scanner_tb.vhd;h=342b1c53752723fe197f1b8372d15ff07c2524d4;hb=7a5b74318bcc702f114c99b53135dec67022c9bb;hp=f5a0a34ad7d023a7f8f37b0c85666f19ec936c8c;hpb=cc27110a810d9ddb4c2b05caf226864390af29a1;p=hwmod.git diff --git a/src/beh_scanner_tb.vhd b/src/beh_scanner_tb.vhd index f5a0a34..342b1c5 100644 --- a/src/beh_scanner_tb.vhd +++ b/src/beh_scanner_tb.vhd @@ -76,7 +76,7 @@ begin return y; end function; - function valid_char (x : std_logic_vector(7 downto 0); last : std_logic_vector(7 downto 0)) return boolean is + function valid_char (x : std_logic_vector(7 downto 0)) return boolean is variable y : boolean; begin case x is @@ -104,7 +104,6 @@ begin variable checkall : boolean := true; variable run_tc, run_inner : boolean := true; variable i, j, k, y : natural; - variable last : std_logic_vector(7 downto 0); begin -- init & reset sys_res_n <= '0'; @@ -165,7 +164,6 @@ begin j := 0; k := 1; mainl : while run_tc loop - last := data; icwait(sys_clk, 1); j := j + 1; @@ -180,14 +178,20 @@ begin case input(j) is when nul => data <= ascii2sc(x"1c"); -- $ (enter) when '!' => data <= ascii2sc(x"0e"); -- ! (backspace) + when '/' => + data <= x"e0"; + icwait(sys_clk, 1); + new_data <= '0'; + icwait(sys_clk, 1); + new_data <= '1'; + data <= SC_KP_DIV; when others => data <= ascii2sc(std_logic_vector(to_unsigned(character'pos(input(j)),8))); end case; icwait(sys_clk, 1); new_data <= '0'; - -- ack'en skippen, falls es ein "spezielles" zeichen ist (steht - -- in abhaengigkeit zum vorherigen zeichen) - if(not valid_char(data, last)) then + -- ack'en skippen, falls es ein "spezielles" zeichen ist + if(not valid_char(data)) then next mainl; end if;