Adds checks to tests
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
|
||||
vhdl_srcs = down_counter_int.vhd \
|
||||
../scripts/test_utility.vhd \
|
||||
top_entity.vhd \
|
||||
test_top_entity.vhd \
|
||||
|
||||
|
||||
@@ -4,8 +4,11 @@ library ieee;
|
||||
library std;
|
||||
use std.env.all;
|
||||
|
||||
library work;
|
||||
use work.test_utility.all;
|
||||
|
||||
entity test_top_entity is
|
||||
generic( CHECK_RESULTS : boolean );
|
||||
generic( GUI_MODE : boolean; CHECK_RESULTS : boolean );
|
||||
end entity test_top_entity;
|
||||
|
||||
architecture test of test_top_entity is
|
||||
@@ -31,12 +34,19 @@ begin
|
||||
|
||||
p_run : process
|
||||
begin
|
||||
wait until falling_edge( RESET );
|
||||
wait until falling_edge( RESET );
|
||||
for i in 0 to 128 loop
|
||||
wait until rising_edge( CLK );
|
||||
wait until rising_edge( CLK );
|
||||
end loop;
|
||||
wait until rising_edge( CLK );
|
||||
stop;
|
||||
|
||||
assert_eq( CNT, "0111000" );
|
||||
|
||||
if ( GUI_MODE ) then
|
||||
std.env.stop;
|
||||
else
|
||||
std.env.finish;
|
||||
end if;
|
||||
end process p_run;
|
||||
|
||||
end architecture test;
|
||||
|
||||
Reference in New Issue
Block a user