Skip to content
Snippets Groups Projects
Commit 7e97a4ba authored by Daniel van der Schuur's avatar Daniel van der Schuur
Browse files

-Added severity level selection.

parent 07c89be7
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,7 @@ USE technology_lib.technology_select_pkg.ALL;
ENTITY eth_statistics IS
GENERIC (
g_disable_failures : BOOLEAN := FALSE; --TRUE: report warnings instead of failures - does not stop sim.
g_runtime_nof_packets : NATURAL; -- Run the test bench for nof_packets before asserting tb_end
g_runtime_timeout : TIME; -- Report Failure if g_runtime_nof_packets is not reached before this time
g_check_nof_valid : BOOLEAN := FALSE; -- True enables valid count checking at tb_end. Reports Failure in case of mismatch.
......@@ -50,6 +51,8 @@ END eth_statistics;
ARCHITECTURE str OF eth_statistics IS
CONSTANT c_severity_level : SEVERITY_LEVEL := sel_a_b(g_disable_failures, WARNING, FAILURE);
CONSTANT c_eth_clk_freq_mhz : NATURAL := 125;
CONSTANT c_eth_word_w : NATURAL := 32;
CONSTANT c_eth_clk_period : TIME := 8 ns;
......@@ -155,7 +158,7 @@ BEGIN
REPORT "[eth_statistics] Timeout occured!" SEVERITY FAILURE;
ELSIF nxt_tb_end='1' THEN
IF falling_edge(eth_clk) THEN
IF (g_check_nof_valid=TRUE AND valid_count/=g_check_nof_valid_ref) THEN REPORT "[eth_statistics] Valid count does not match reference" SEVERITY FAILURE; END IF;
IF (g_check_nof_valid=TRUE AND valid_count/=g_check_nof_valid_ref) THEN REPORT "[eth_statistics] Valid count does not match reference" SEVERITY c_severity_level; END IF;
END IF;
END IF;
END PROCESS;
......
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