From 258b4a4f3af5334a486b66398948ddb56758e13e Mon Sep 17 00:00:00 2001 From: Eric Kooistra <kooistra@astron.nl> Date: Thu, 3 Nov 2022 08:31:14 +0100 Subject: [PATCH] Use c_tb_timeout to raise ERROR if there is no result. --- libraries/io/nw_10GbE/tb/vhdl/tb_nw_arp_request.vhd | 5 ++++- libraries/io/nw_10GbE/tb/vhdl/tb_nw_ping_response.vhd | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libraries/io/nw_10GbE/tb/vhdl/tb_nw_arp_request.vhd b/libraries/io/nw_10GbE/tb/vhdl/tb_nw_arp_request.vhd index 3667db15d7..c714f21e19 100644 --- a/libraries/io/nw_10GbE/tb/vhdl/tb_nw_arp_request.vhd +++ b/libraries/io/nw_10GbE/tb/vhdl/tb_nw_arp_request.vhd @@ -45,6 +45,9 @@ END tb_nw_arp_request; ARCHITECTURE tb OF tb_nw_arp_request IS + -- Use c_tb_timeout to raise ERROR if there is no result + CONSTANT c_tb_timeout : NATURAL := 100; + SIGNAL tb_end : STD_LOGIC := '0'; SIGNAL clk : STD_LOGIC := '1'; SIGNAL dp_pps : STD_LOGIC := '1'; @@ -77,7 +80,7 @@ BEGIN dp_pps <= '0'; proc_common_wait_some_cycles(clk, 10); src_in.ready <= '1'; - proc_common_wait_until_evt(clk, src_out.eop); + proc_common_wait_until_evt(c_tb_timeout, clk, src_out.eop); tb_end <= '1'; -- End with WAIT to avoid Warning: (vcom-1090) Possible infinite loop: -- Process contains no WAIT statement. diff --git a/libraries/io/nw_10GbE/tb/vhdl/tb_nw_ping_response.vhd b/libraries/io/nw_10GbE/tb/vhdl/tb_nw_ping_response.vhd index b2bd80c4f2..a5c3c5dc6b 100644 --- a/libraries/io/nw_10GbE/tb/vhdl/tb_nw_ping_response.vhd +++ b/libraries/io/nw_10GbE/tb/vhdl/tb_nw_ping_response.vhd @@ -42,6 +42,9 @@ END tb_nw_ping_response; ARCHITECTURE tb OF tb_nw_ping_response IS + -- Use c_tb_timeout to raise ERROR if there is no result + CONSTANT c_tb_timeout : NATURAL := 100; + CONSTANT c_data_w : NATURAL := 64; CONSTANT c_nof_ping_packet_fields : NATURAL := 21; @@ -183,7 +186,7 @@ BEGIN p_tb_end : PROCESS BEGIN FOR I IN 0 TO 2*c_nof_ping_responses LOOP - proc_common_wait_until_evt(clk, nw_ping_response_src_out.eop); + proc_common_wait_until_evt(c_tb_timeout, clk, nw_ping_response_src_out.eop); END LOOP; tb_end <= '1'; -- End with WAIT to avoid Warning: (vcom-1090) Possible infinite loop: -- GitLab