Skip to content

Commit

Permalink
Set UVM_LOW for verilator on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario committed Mar 20, 2024
1 parent e496d3e commit d444ae3
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
9 changes: 9 additions & 0 deletions corev_apu/tb/ariane_testharness.sv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions verif/regress/smoke-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 19 additions & 2 deletions verif/tb/core/custom_uvm_macros.svh
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit d444ae3

Please sign in to comment.