Skip to content
Snippets Groups Projects
Commit 264b1e6c authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Made tb self stopping.

parent cd9246e3
Branches
No related tags found
No related merge requests found
...@@ -51,6 +51,7 @@ ARCHITECTURE tb OF tb_util_heater IS ...@@ -51,6 +51,7 @@ ARCHITECTURE tb OF tb_util_heater IS
CONSTANT c_reg_nof_words : NATURAL := 2; -- derived from c_nof_mac4 / c_word_w CONSTANT c_reg_nof_words : NATURAL := 2; -- derived from c_nof_mac4 / c_word_w
SIGNAL tb_end : STD_LOGIC := '0';
SIGNAL mm_rst : STD_LOGIC; SIGNAL mm_rst : STD_LOGIC;
SIGNAL mm_clk : STD_LOGIC := '0'; SIGNAL mm_clk : STD_LOGIC := '0';
SIGNAL st_rst : STD_LOGIC; SIGNAL st_rst : STD_LOGIC;
...@@ -62,10 +63,10 @@ ARCHITECTURE tb OF tb_util_heater IS ...@@ -62,10 +63,10 @@ ARCHITECTURE tb OF tb_util_heater IS
BEGIN BEGIN
-- as 10 -- as 10
-- run 20 us -- run -all
mm_clk <= NOT mm_clk AFTER mm_clk_period/2; mm_clk <= NOT mm_clk OR tb_end AFTER mm_clk_period/2;
st_clk <= NOT st_clk AFTER st_clk_period/2; st_clk <= NOT st_clk OR tb_end AFTER st_clk_period/2;
mm_rst <= '1', '0' AFTER mm_clk_period*5; mm_rst <= '1', '0' AFTER mm_clk_period*5;
st_rst <= '1', '0' AFTER st_clk_period*5; st_rst <= '1', '0' AFTER st_clk_period*5;
...@@ -99,6 +100,8 @@ BEGIN ...@@ -99,6 +100,8 @@ BEGIN
FOR I IN 0 TO c_time_heater_off-1 LOOP FOR I IN 0 TO c_time_heater_off-1 LOOP
WAIT UNTIL rising_edge(mm_clk); WAIT UNTIL rising_edge(mm_clk);
END LOOP; END LOOP;
tb_end <= '1';
WAIT;
END PROCESS; END PROCESS;
dut : ENTITY work.util_heater dut : ENTITY work.util_heater
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment