diff --git a/verification/tb_template/test/tb_ctrl.vhd b/verification/tb_template/test/tb_ctrl.vhd index 83ff9a3..a1975e2 100644 --- a/verification/tb_template/test/tb_ctrl.vhd +++ b/verification/tb_template/test/tb_ctrl.vhd @@ -23,7 +23,6 @@ use ieee.std_logic_misc.all; library std; use std.env.all; -use work.tb_pkg.all; entity tb_ctrl is generic ( @@ -56,9 +55,8 @@ end entity; architecture sim of tb_ctrl is - -- This defines the system clock frequency. The TB will generate a x4 clock and - -- derive the system clock at this frequency from this. - constant TIMEOUT_COUNT : integer := 10000000; + package tb_pkg is new work.tb_pkg; + use tb_pkg.all; signal is_gui_run : boolean := false; signal count : integer := 0; @@ -102,7 +100,7 @@ begin -- End-of-simulation signals end_sim <= '1' when count = to_integer(unsigned(timeout)) or do_stop = '1' or do_finish = '1' else '0'; - failed <= true when end_sim = '1' and (error = '1' or count >= to_integer(unsigned(timeout))) else false; + failed <= true when end_sim = '1' and (error = '1' or count = to_integer(unsigned(timeout))) else false; passed <= true when end_sim = '1' and error = '0' else false; -----------------------------------------