From 7e97a4ba894b1ef46bb346770d3e7702c95f084a Mon Sep 17 00:00:00 2001 From: Daniel van der Schuur <schuur@astron.nl> Date: Thu, 8 Jun 2017 09:55:58 +0000 Subject: [PATCH] -Added severity level selection. --- libraries/io/eth/src/vhdl/eth_statistics.vhd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/io/eth/src/vhdl/eth_statistics.vhd b/libraries/io/eth/src/vhdl/eth_statistics.vhd index be3d079632..d3f16a0ccb 100644 --- a/libraries/io/eth/src/vhdl/eth_statistics.vhd +++ b/libraries/io/eth/src/vhdl/eth_statistics.vhd @@ -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; -- GitLab