2 use ieee.std_logic_1164.all;
3 use ieee.numeric_std.all;
6 entity beh_history_tb is
7 end entity beh_history_tb;
9 architecture sim of beh_history_tb is
11 signal sys_clk, sys_res_n : std_logic;
13 signal d_new_eingabe, d_new_result : std_logic;
14 signal d_zeile : hzeile;
15 signal d_spalte : hspalte;
16 signal d_get, d_done : std_logic;
17 signal d_char : hbyte;
19 signal s_char : hbyte;
20 signal s_take, s_done, s_backspace : std_logic;
22 -- tmp: history<>scanner
23 signal do_it, finished : std_logic;
25 signal stop : boolean := false;
28 inst : entity work.history(beh)
31 sys_res_n => sys_res_n,
36 s_backspace => s_backspace,
38 d_new_eingabe => d_new_eingabe,
39 d_new_result => d_new_result,
62 variable input : hstring := "12345678 ";
63 variable ctmp : character;
65 variable checkall : boolean := true;
66 variable i : integer := 1;
74 d_zeile <= (others => '0');
75 d_spalte <= (others => '0');
85 s_char <= hbyte(to_unsigned(character'pos(ctmp),8));
88 wait on d_new_eingabe;
92 d_spalte <= std_logic_vector(to_unsigned(j,7));
93 d_zeile <= (others => '0');
97 if d_char /= hbyte(to_unsigned(character'pos(input(j)),8)) then
98 assert(false) report "passt nicht? d_char: "
99 & character'val(to_integer(unsigned(d_char))) & ", solte sein: "
117 report "alle testfaelle der History waren erfolgreich!";
119 report "einige testfaelle schlugen fehl";
125 end architecture sim;