From 8b71641bd6625b61949e6dd215520a695de24a3c Mon Sep 17 00:00:00 2001 From: donker <donker@astron.nl> Date: Thu, 4 Apr 2024 12:01:41 +0200 Subject: [PATCH] L2SDP-1032, now a better assert format --- .../tb/vhdl/tb_rdma_generator.vhd | 24 +++++++++---------- .../dp/tb/vhdl/tb_mmp_dp_bsn_align_v2.vhd | 21 +++++++--------- libraries/dsp/iquv/tb/vhdl/tb_iquv.vhd | 2 +- libraries/dsp/iquv/tb/vhdl/tb_iquv_iab.vhd | 2 +- .../io/eth/tb/vhdl/tb_eth_stream_udp.vhd | 4 ++-- libraries/io/eth/tb/vhdl/tb_eth_tester.vhd | 12 +++++----- .../io/eth/tb/vhdl/tb_eth_tester_high_bw.vhd | 4 ++-- 7 files changed, 33 insertions(+), 36 deletions(-) diff --git a/applications/rdma_demo/libraries/rdma_generator/tb/vhdl/tb_rdma_generator.vhd b/applications/rdma_demo/libraries/rdma_generator/tb/vhdl/tb_rdma_generator.vhd index e84bc27724..eae40bfd2f 100644 --- a/applications/rdma_demo/libraries/rdma_generator/tb/vhdl/tb_rdma_generator.vhd +++ b/applications/rdma_demo/libraries/rdma_generator/tb/vhdl/tb_rdma_generator.vhd @@ -442,22 +442,22 @@ begin -- Verify, only log when wrong if I = 0 then assert tx_mon_nof_sop_arr(I) = c_mon_nof_sop_first - report - c_tb_str & "Wrong tx nof_sop for stream (" & natural'image(I) & ")" severity ERROR; + report c_tb_str & "Wrong tx nof_sop for stream (" & natural'image(I) & ")" + severity ERROR; assert tx_mon_nof_valid_arr(I) = c_mon_nof_valid_first_tx - report - c_tb_str & "Wrong tx nof_valid for stream (" & natural'image(I) & ")" severity ERROR; + report c_tb_str & "Wrong tx nof_valid for stream (" & natural'image(I) & ")" + severity ERROR; else assert tx_mon_nof_sop_arr(I) = c_mon_nof_sop_others - report - c_tb_str & "Wrong tx nof_sop for stream (" & natural'image(I) & ")" severity ERROR; + report c_tb_str & "Wrong tx nof_sop for stream (" & natural'image(I) & ")" + severity ERROR; assert tx_mon_nof_valid_arr(I) = c_mon_nof_valid_others_tx - report - c_tb_str & "Wrong tx nof_valid for stream (" & natural'image(I) & ")" severity ERROR; + report c_tb_str & "Wrong tx nof_valid for stream (" & natural'image(I) & ")" + severity ERROR; end if; assert tx_mon_latency_arr(I) = c_tx_exp_latency - report - c_tb_str & "Wrong tx latency for stream (" & natural'image(I) & ")" severity ERROR; + report c_tb_str & "Wrong tx latency for stream (" & natural'image(I) & ")" + severity ERROR; -- For short block lengths the Rx latency appears to become less, the -- exact Rx latency is therefore hard to predetermine. The actual @@ -465,8 +465,8 @@ begin -- the latency when it is more or less fixed. if c_rx_exp_latency_en then assert almost_equal(rx_mon_latency_arr(I), c_rx_exp_latency_st, 10) - report - c_tb_str & "Wrong rx latency using st interface (" & natural'image(I) & ")" severity ERROR; + report c_tb_str & "Wrong rx latency using st interface (" & natural'image(I) & ")" + severity ERROR; end if; end if; end loop; diff --git a/libraries/base/dp/tb/vhdl/tb_mmp_dp_bsn_align_v2.vhd b/libraries/base/dp/tb/vhdl/tb_mmp_dp_bsn_align_v2.vhd index dcfdd5faab..7a612c135a 100644 --- a/libraries/base/dp/tb/vhdl/tb_mmp_dp_bsn_align_v2.vhd +++ b/libraries/base/dp/tb/vhdl/tb_mmp_dp_bsn_align_v2.vhd @@ -217,8 +217,8 @@ begin proc_mem_mm_bus_rd(2 * I, mm_clk, reg_bsn_align_cipo, reg_bsn_align_copi); proc_mem_mm_bus_rd_latency(1, mm_clk); assert reg_bsn_align_cipo.rddata(0) = '1' - report - "Wrong stream disable for output " & int_to_str(I) severity ERROR; + report "Wrong stream disable for output " & int_to_str(I) + severity ERROR; end loop; -- Write stream enable bits for stream_en_arr @@ -233,8 +233,8 @@ begin proc_mem_mm_bus_rd(2 * I, mm_clk, reg_bsn_align_cipo, reg_bsn_align_copi); proc_mem_mm_bus_rd_latency(1, mm_clk); assert reg_bsn_align_cipo.rddata(0) = '0' - report - "Wrong BSN align stream enable for output " & int_to_str(I) severity ERROR; + report "Wrong BSN align stream enable for output " & int_to_str(I) + severity ERROR; end loop; -- Write stream enable bits for stream_en_arr @@ -249,8 +249,8 @@ begin proc_mem_mm_bus_rd(2 * I, mm_clk, reg_bsn_align_cipo, reg_bsn_align_copi); proc_mem_mm_bus_rd_latency(1, mm_clk); assert reg_bsn_align_cipo.rddata(0) = '1' - report - "Wrong BSN align stream enable for output " & int_to_str(I) severity ERROR; + report "Wrong BSN align stream enable for output " & int_to_str(I) + severity ERROR; end loop; -- End of MM test @@ -272,8 +272,7 @@ begin if g_lost_input = true and I = c_nof_streams - 1 then v_exp_latency := -1; -- -1 for BSN monitor timeout due to lost input assert mon_latency_input_arr(I) = v_exp_latency - report - "Wrong input BSN monitor latency timeout for input " & int_to_str(I) & + report "Wrong input BSN monitor latency timeout for input " & int_to_str(I) & " (" & int_to_str(mon_latency_input_arr(I)) & " /= " & int_to_str(v_exp_latency) & ")" @@ -281,8 +280,7 @@ begin else v_exp_latency := c_mon_sync_latency + func_input_delay(I); assert mon_latency_input_arr(I) = v_exp_latency - report - "Wrong input BSN monitor latency for input " & int_to_str(I) & + report "Wrong input BSN monitor latency for input " & int_to_str(I) & " (" & int_to_str(mon_latency_input_arr(I)) & " /= " & int_to_str(v_exp_latency) & ")" @@ -298,8 +296,7 @@ begin proc_common_wait_some_cycles(mm_clk, 1); v_exp_latency := c_mon_sync_latency + c_total_latency; assert mon_latency_output = v_exp_latency - report - "Wrong output BSN monitor latency (" & int_to_str(mon_latency_output) & + report "Wrong output BSN monitor latency (" & int_to_str(mon_latency_output) & " /= " & int_to_str(v_exp_latency) & ")" severity ERROR; diff --git a/libraries/dsp/iquv/tb/vhdl/tb_iquv.vhd b/libraries/dsp/iquv/tb/vhdl/tb_iquv.vhd index d6b9c13e84..941f2d8b8c 100644 --- a/libraries/dsp/iquv/tb/vhdl/tb_iquv.vhd +++ b/libraries/dsp/iquv/tb/vhdl/tb_iquv.vhd @@ -327,7 +327,7 @@ begin end if; report "I = " & integer'image(to_uint(i_out.data)) & ", Q = " & integer'image(to_sint(q_out.data)) & - ", U = " & integer'image(to_sint(u_out.data)) & ", V = " & integer'image(to_sint(v_out.data)); + ", U = " & integer'image(to_sint(u_out.data)) & ", V = " & integer'image(to_sint(v_out.data)); v_index := v_index + 1; end if; end if; diff --git a/libraries/dsp/iquv/tb/vhdl/tb_iquv_iab.vhd b/libraries/dsp/iquv/tb/vhdl/tb_iquv_iab.vhd index e164712465..773c8d4987 100644 --- a/libraries/dsp/iquv/tb/vhdl/tb_iquv_iab.vhd +++ b/libraries/dsp/iquv/tb/vhdl/tb_iquv_iab.vhd @@ -230,7 +230,7 @@ begin end if; report "I = " & integer'image(to_uint(i_out.data)) & ", Q = " & integer'image(to_sint(q_out.data)) & - ", U = " & integer'image(to_sint(u_out.data)) & ", V = " & integer'image(to_sint(v_out.data)); + ", U = " & integer'image(to_sint(u_out.data)) & ", V = " & integer'image(to_sint(v_out.data)); v_index := v_index + 1; end if; end if; diff --git a/libraries/io/eth/tb/vhdl/tb_eth_stream_udp.vhd b/libraries/io/eth/tb/vhdl/tb_eth_stream_udp.vhd index d6429cbfdd..849919cad9 100644 --- a/libraries/io/eth/tb/vhdl/tb_eth_stream_udp.vhd +++ b/libraries/io/eth/tb/vhdl/tb_eth_stream_udp.vhd @@ -359,8 +359,8 @@ begin -- the latency when it is more or less fixed. if c_rx_exp_latency_en then assert almost_equal(rx_mon_latency, c_rx_exp_latency_st, 0) - report - c_tb_str & "Wrong rx latency using st interface" severity ERROR; + report c_tb_str & "Wrong rx latency using st interface" + severity ERROR; end if; end if; diff --git a/libraries/io/eth/tb/vhdl/tb_eth_tester.vhd b/libraries/io/eth/tb/vhdl/tb_eth_tester.vhd index 7bfba209f6..58af9274ec 100644 --- a/libraries/io/eth/tb/vhdl/tb_eth_tester.vhd +++ b/libraries/io/eth/tb/vhdl/tb_eth_tester.vhd @@ -543,18 +543,18 @@ begin if g_nof_streams = 1 then if g_eth_sim_level = 0 then assert almost_equal(rx_mon_latency_arr(I), c_rx_exp_latency_tech_tse, 10) - report - c_tb_str & "Wrong rx latency using tech_tse interface" severity ERROR; + report c_tb_str & "Wrong rx latency using tech_tse interface" + severity ERROR; elsif g_eth_sim_level = 1 then assert almost_equal(rx_mon_latency_arr(I), c_rx_exp_latency_sim_tse, 10) - report - c_tb_str & "Wrong rx latency using sim_tse interface" severity ERROR; + report c_tb_str & "Wrong rx latency using sim_tse interface" + severity ERROR; end if; end if; else assert almost_equal(rx_mon_latency_arr(I), c_rx_exp_latency_st, 10) - report - c_tb_str & "Wrong rx latency using st interface (" & natural'image(I) & ")" severity ERROR; + report c_tb_str & "Wrong rx latency using st interface (" & natural'image(I) & ")" + severity ERROR; end if; end if; end if; diff --git a/libraries/io/eth/tb/vhdl/tb_eth_tester_high_bw.vhd b/libraries/io/eth/tb/vhdl/tb_eth_tester_high_bw.vhd index 14d8e77a94..2774b5be64 100644 --- a/libraries/io/eth/tb/vhdl/tb_eth_tester_high_bw.vhd +++ b/libraries/io/eth/tb/vhdl/tb_eth_tester_high_bw.vhd @@ -482,8 +482,8 @@ begin -- the latency when it is more or less fixed. if c_rx_exp_latency_en then assert almost_equal(rx_mon_latency_arr(I), c_rx_exp_latency_st, 10) - report - c_tb_str & "Wrong rx latency using st interface (" & natural'image(I) & ")" severity ERROR; + report c_tb_str & "Wrong rx latency using st interface (" & natural'image(I) & ")" + severity ERROR; end if; end if; end loop; -- GitLab