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

Correct BG bps logging.

parent b5a32ef4
No related branches found
No related tags found
1 merge request!288Resolve L2SDP-836
Pipeline #38613 passed
...@@ -103,9 +103,9 @@ ARCHITECTURE tb OF tb_eth_tester IS ...@@ -103,9 +103,9 @@ ARCHITECTURE tb OF tb_eth_tester IS
CONSTANT c_eth_packet_len_others : NATURAL := func_eth_tester_eth_packet_length(c_bg_block_len_others); CONSTANT c_eth_packet_len_others : NATURAL := func_eth_tester_eth_packet_length(c_bg_block_len_others);
-- Use REAL to avoid NATURAL overflow in bps calculation -- Use REAL to avoid NATURAL overflow in bps calculation
CONSTANT c_eth_nof_bps_first : REAL := REAL(c_eth_packet_len_first * c_octet_w) * REAL(c_nof_st_clk_per_s) / REAL(c_bg_slot_len_first); CONSTANT c_bg_nof_bps_first : REAL := REAL(c_bg_block_len_first * c_octet_w) * REAL(c_nof_st_clk_per_s) / REAL(c_bg_slot_len_first);
CONSTANT c_eth_nof_bps_others : REAL := REAL(c_eth_packet_len_others * c_octet_w) * REAL(c_nof_st_clk_per_s) / REAL(c_bg_slot_len_others); CONSTANT c_bg_nof_bps_others : REAL := REAL(c_bg_block_len_others * c_octet_w) * REAL(c_nof_st_clk_per_s) / REAL(c_bg_slot_len_others);
CONSTANT c_eth_nof_bps_total : REAL := c_eth_nof_bps_first + REAL(g_nof_streams - 1) * c_eth_nof_bps_others; CONSTANT c_bg_nof_bps_total : REAL := c_bg_nof_bps_first + REAL(g_nof_streams - 1) * c_bg_nof_bps_others;
CONSTANT c_bg_sync_period_first : NATURAL := c_bg_slot_len_first * g_bg_ctrl_first.blocks_per_sync; CONSTANT c_bg_sync_period_first : NATURAL := c_bg_slot_len_first * g_bg_ctrl_first.blocks_per_sync;
CONSTANT c_bg_sync_period_others : NATURAL := c_bg_slot_len_others * g_bg_ctrl_others.blocks_per_sync; CONSTANT c_bg_sync_period_others : NATURAL := c_bg_slot_len_others * g_bg_ctrl_others.blocks_per_sync;
...@@ -346,19 +346,19 @@ BEGIN ...@@ -346,19 +346,19 @@ BEGIN
IF I = 0 THEN IF I = 0 THEN
print_str(c_tb_str & print_str(c_tb_str &
"ETH bit rate (" & NATURAL'IMAGE(I) & ") :" & "ETH bit rate (" & NATURAL'IMAGE(I) & ") :" &
" c_eth_nof_bps_first = " & REAL'IMAGE(c_eth_nof_bps_first) & " bps"); " c_bg_nof_bps_first = " & REAL'IMAGE(c_bg_nof_bps_first) & " bps");
ELSE ELSE
print_str(c_tb_str & print_str(c_tb_str &
"ETH bit rate (" & NATURAL'IMAGE(I) & ") :" & "ETH bit rate (" & NATURAL'IMAGE(I) & ") :" &
" c_eth_nof_bps_others = " & REAL'IMAGE(c_eth_nof_bps_others) & " bps"); " c_bg_nof_bps_others = " & REAL'IMAGE(c_bg_nof_bps_others) & " bps");
END IF; END IF;
END LOOP; END LOOP;
IF g_nof_streams > 1 THEN IF g_nof_streams > 1 THEN
print_str(c_tb_str & print_str(c_tb_str &
"ETH bit rate total :" & "ETH bit rate total :" &
" c_eth_nof_bps_total = " & REAL'IMAGE(c_eth_nof_bps_total) & " bps"); " c_bg_nof_bps_total = " & REAL'IMAGE(c_bg_nof_bps_total) & " bps");
END IF; END IF;
ASSERT c_eth_nof_bps_total < 10.0**9 REPORT "Tx flow control will keep ETH bitrate < 1Gbps." SEVERITY NOTE; ASSERT c_bg_nof_bps_total < 10.0**9 REPORT "Tx flow control will keep ETH bitrate < 1Gbps." SEVERITY NOTE;
------------------------------------------------------------------------- -------------------------------------------------------------------------
-- Verification: Total counts -- Verification: Total counts
...@@ -397,7 +397,7 @@ BEGIN ...@@ -397,7 +397,7 @@ BEGIN
-- Verify, only log when wrong -- Verify, only log when wrong
IF g_corrupted_en = FALSE THEN IF g_corrupted_en = FALSE THEN
IF c_eth_nof_bps_total < 10.0**9 THEN IF c_bg_nof_bps_total < 10.0**9 THEN
ASSERT tx_total_count_nof_packet_arr(I) = exp_total_count_nof_packet_arr(I) REPORT c_tb_str & ASSERT tx_total_count_nof_packet_arr(I) = exp_total_count_nof_packet_arr(I) REPORT c_tb_str &
"Wrong Tx total nof packets count(" & NATURAL'IMAGE(I) & "Wrong Tx total nof packets count(" & NATURAL'IMAGE(I) &
"), Tx count = " & NATURAL'IMAGE(tx_total_count_nof_packet_arr(I)) & "), Tx count = " & NATURAL'IMAGE(tx_total_count_nof_packet_arr(I)) &
...@@ -484,7 +484,7 @@ BEGIN ...@@ -484,7 +484,7 @@ BEGIN
", nof_valid = " & NATURAL'IMAGE(rx_mon_nof_valid_arr(I)) & ", nof_valid = " & NATURAL'IMAGE(rx_mon_nof_valid_arr(I)) &
", latency = " & NATURAL'IMAGE(rx_mon_latency_arr(I))); ", latency = " & NATURAL'IMAGE(rx_mon_latency_arr(I)));
IF c_eth_nof_bps_total < 10.0**9 THEN IF c_bg_nof_bps_total < 10.0**9 THEN
-- Verify BSN monitors only when the BG sync interval is stable, so -- Verify BSN monitors only when the BG sync interval is stable, so
-- the ETH data rate < 1 Gbps and no BG block flow control. -- the ETH data rate < 1 Gbps and no BG block flow control.
-- Verify, only log when wrong -- Verify, only log when wrong
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment