Skip to content

Commit

Permalink
Drop an import from inside of a class
Browse files Browse the repository at this point in the history
This causes VCS to spit out an error because it's not technically
allowed in SystemVerilog. The only things that we needed to import
seems to have been the CSR_MHPMCOUNTER3* names. We can just refer to
them explicitly.
  • Loading branch information
rswarbrick committed May 26, 2023
1 parent 3b34f80 commit 1985c76
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
`include "cosim_dpi.svh"

class ibex_cosim_scoreboard extends uvm_scoreboard;
import ibex_pkg::*;
chandle cosim_handle;

core_ibex_cosim_cfg cfg;
Expand Down Expand Up @@ -151,8 +150,10 @@ class ibex_cosim_scoreboard extends uvm_scoreboard;

// Set performance counters through a pseudo-backdoor write
for (int i=0; i < 10; i++) begin
riscv_cosim_set_csr(cosim_handle, CSR_MHPMCOUNTER3 + i, rvfi_instr.mhpmcounters[i]);
riscv_cosim_set_csr(cosim_handle, CSR_MHPMCOUNTER3H + i, rvfi_instr.mhpmcountersh[i]);
riscv_cosim_set_csr(cosim_handle,
ibex_pkg::CSR_MHPMCOUNTER3 + i, rvfi_instr.mhpmcounters[i]);
riscv_cosim_set_csr(cosim_handle,
ibex_pkg::CSR_MHPMCOUNTER3H + i, rvfi_instr.mhpmcountersh[i]);
end

riscv_cosim_set_ic_scr_key_valid(cosim_handle, rvfi_instr.ic_scr_key_valid);
Expand Down

0 comments on commit 1985c76

Please sign in to comment.