Adds checks to tests

This commit is contained in:
kutningjo
2024-10-22 21:22:06 +02:00
parent b4e75e651c
commit 0fff028d26
12 changed files with 297 additions and 7 deletions
+1
View File
@@ -1,5 +1,6 @@
vhdl_srcs = down_counter_int.vhd \
../scripts/test_utility.vhd \
top_entity.vhd \
test_top_entity.vhd \
+14 -4
View File
@@ -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;