2 use IEEE.STD_LOGIC_1164.
all;
3 use ieee.numeric_std.
all;
11 architecture beh
of tb
is
15 CLK
, RESET
: in std_ulogic
;
16 DATA_OUT
: out std_ulogic_vector
(7 downto 0);
17 DONE_OUT
: out std_ulogic
21 signal data
: std_ulogic_vector
(7 downto 0) := "
00100000"
;
22 signal clk
: std_ulogic
;
23 signal RESET
: std_ulogic
:= '0';
24 signal done
: std_ulogic
:= '0';
25 signal cyclecount
: integer := 0;
27 constant cycle_time_c
: time := 200 ms
;
28 constant maxcycles
: integer := 100;
43 wait for cycle_time_c
/2;
45 wait for cycle_time_c
/2;
48 count_process
: process(CLK
)
50 if (CLK
'event and CLK
='1') then
54 cyclecount
<= cyclecount
+ 1;
64 wait until (clk
'event and clk
='1');
65 wait until (clk
'event and clk
='1');
67 wait until (clk
'event and clk
='1');
68 for cyclecnt
in 1 to maxcycles
loop
70 wait until (clk
'event and clk
='1');
71 report integer'image(to_integer
(unsigned
(data
)));
73 wait until (clk
'event and clk
='1');
75 report "
All tests passed."
severity NOTE
;