diff --git a/corev_apu/tb/ariane_testharness.sv b/corev_apu/tb/ariane_testharness.sv index dfa1900077..0f5ea25442 100644 --- a/corev_apu/tb/ariane_testharness.sv +++ b/corev_apu/tb/ariane_testharness.sv @@ -714,6 +714,15 @@ module ariane_testharness #( end `endif +`ifdef VERILATOR + initial begin + int verbosity = 0; + if ($value$plusargs("+UVM_VERBOSITY=%s",verbosity)) begin + uvm_set_verbosity_level(verbosity); + end + end +`endif + `ifdef AXI_SVA // AXI 4 Assertion IP integration - You will need to get your own copy of this IP if you want diff --git a/verif/regress/smoke-tests.sh b/verif/regress/smoke-tests.sh index 8d880f2327..135048bb61 100644 --- a/verif/regress/smoke-tests.sh +++ b/verif/regress/smoke-tests.sh @@ -30,9 +30,13 @@ echo "$SPIKE_INSTALL_DIR$" if ! [ -n "$DV_SIMULATORS" ]; then DV_SIMULATORS=vcs-testharness,spike - fi +fi + +if ! [ -n "$UVM_VERBOSITY_LEVEL" ]; then + UVM_VERBOSITY_LEVEL=UVM_NONE +fi -export DV_OPTS="$DV_OPTS --issrun_opts=\"+UVM_VERBOSITY=UVM_NONE\"" +export DV_OPTS="$DV_OPTS --issrun_opts=\"+UVM_VERBOSITY=$UVM_VERBOSITY_LEVEL\"" cd verif/sim/ python3 cva6.py --testlist=../tests/testlist_riscv-compliance-cv64a6_imafdc_sv39.yaml --test rv32i-I-ADD-01 --iss_yaml cva6.yaml --target cv64a6_imafdc_sv39 --iss=$DV_SIMULATORS $DV_OPTS diff --git a/verif/tb/core/custom_uvm_macros.svh b/verif/tb/core/custom_uvm_macros.svh index d88387df74..fc32b7b960 100644 --- a/verif/tb/core/custom_uvm_macros.svh +++ b/verif/tb/core/custom_uvm_macros.svh @@ -44,14 +44,31 @@ typedef enum end static longint sim_errors = 0; -parameter max_errors = 10; +parameter max_errors = 5; + +static uvm_verbosity current_verbosity_level = UVM_LOW; + +int string_to_verbosity_level [string] = '{ + "UVM_NONE" : 0, + "UVM_LOW" : 100, + "UVM_MEDIUM" : 200, + "UVM_HIGH" : 300, + "UVM_FULL" : 400, + "UVM_DEBUG" : 500 }; + +function void uvm_set_verbosity_level(string verbosity); + $display("New verbosity Level: %h", string_to_verbosity_level[verbosity]); + $cast(current_verbosity_level,string_to_verbosity_level[verbosity]); + +endfunction function void uvm_report_info(string id, string message, int verbosity = UVM_MEDIUM, string filename = "", int line = 0); - $display($sformatf("UVM_INFO @ %t ns : %s %s", $time, id, message)); + if (verbosity <= current_verbosity_level) + $display($sformatf("UVM_INFO @ %t ns : %s %s", $time, id, message)); endfunction