-
Notifications
You must be signed in to change notification settings - Fork 706
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add core_cntrl_pkg * Add cva6pkg_utils_pkg * Adapt spike.sv for testharness * Disable rvfi_agent csrs: Add parameter to config * Add custom_uvm_macros to handle uvm_info in verilator
- Loading branch information
1 parent
49f3bf9
commit d2ac6f6
Showing
14 changed files
with
211 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
`ifdef UVM_REPORT_DISABLE_FILE | ||
`define uvm_file "" | ||
`else | ||
`define uvm_file `__FILE__ | ||
`endif | ||
|
||
`ifdef UVM_REPORT_DISABLE_LINE | ||
`define uvm_line 0 | ||
`else | ||
`define uvm_line `__LINE__ | ||
`endif | ||
|
||
typedef enum | ||
{ | ||
UVM_NONE = 0, | ||
UVM_LOW = 100, | ||
UVM_MEDIUM = 200, | ||
UVM_HIGH = 300, | ||
UVM_FULL = 400, | ||
UVM_DEBUG = 500 | ||
} uvm_verbosity; | ||
|
||
`define uvm_info(TOP, MSG, LVL) \ | ||
begin \ | ||
uvm_report_info(TOP, MSG, LVL, `uvm_file, `uvm_line); \ | ||
end | ||
|
||
`define uvm_warning(TOP, MSG, LVL) \ | ||
begin \ | ||
uvm_report_warning(TOP, MSG, LVL, `uvm_file, `uvm_line); \ | ||
end | ||
|
||
`define uvm_error(TOP, MSG) \ | ||
begin \ | ||
uvm_report_error(TOP, MSG, UVM_NONE, `uvm_file, `uvm_line); \ | ||
end | ||
`define uvm_fatal(TOP, MSG) \ | ||
begin \ | ||
uvm_report_fatal(TOP, MSG, UVM_NONE, `uvm_file, `uvm_line); \ | ||
end | ||
|
||
|
||
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)); | ||
endfunction | ||
|
||
|
||
function void uvm_report_warning(string id, | ||
string message, | ||
int verbosity = UVM_MEDIUM, | ||
string filename = "", | ||
int line = 0); | ||
$display($sformatf("UVM_WARNING @ %t ns : %s %s", $time, id , message)); | ||
endfunction | ||
|
||
|
||
function void uvm_report_error(string id, | ||
string message, | ||
int verbosity = UVM_LOW, | ||
string filename = "", | ||
int line = 0); | ||
$display($sformatf("UVM_ERROR @ %t ns : %s %s", $time, id , message)); | ||
endfunction | ||
|
||
function void uvm_report_fatal(string id, | ||
string message, | ||
int verbosity = UVM_NONE, | ||
string filename = "", | ||
int line = 0); | ||
$display($sformatf("UVM_FATAL @ %t ns : %s %s", $time, id , message)); | ||
$finish(); | ||
endfunction |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
`ifndef __UVMA_CORE_CNTRL_PKG_SV__ | ||
`define __UVMA_CORE_CNTRL_PKG_SV__ | ||
|
||
package uvma_core_cntrl_pkg; | ||
|
||
// Constants / Structs / Enums | ||
`include "uvma_core_cntrl_constants.sv" | ||
`include "uvma_core_cntrl_tdefs.sv" | ||
|
||
endpackage : uvma_core_cntrl_pkg | ||
|
||
`endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
function st_core_cntrl_cfg cva6pkg_to_core_cntrl_cfg(st_core_cntrl_cfg base); | ||
|
||
$cast(base.xlen, cva6_config_pkg::CVA6ConfigXlen); | ||
|
||
base.ilen = cva6_config_pkg::CVA6ConfigXlen; | ||
|
||
base.ext_i_supported = 1; | ||
base.ext_a_supported = cva6_config_pkg::cva6_cfg.RVA; | ||
base.ext_m_supported = 1; | ||
base.ext_c_supported = cva6_config_pkg::cva6_cfg.RVC; | ||
base.ext_p_supported = 1; | ||
base.ext_v_supported = cva6_config_pkg::cva6_cfg.RVV; | ||
base.ext_f_supported = cva6_config_pkg::cva6_cfg.RVF | cva6_config_pkg::cva6_cfg.FpuEn; | ||
base.ext_d_supported = cva6_config_pkg::cva6_cfg.RVD; | ||
base.ext_zba_supported = cva6_config_pkg::CVA6ConfigBExtEn; | ||
base.ext_zbb_supported = cva6_config_pkg::CVA6ConfigBExtEn; | ||
base.ext_zbc_supported = cva6_config_pkg::CVA6ConfigBExtEn; | ||
base.ext_zbe_supported = cva6_config_pkg::CVA6ConfigBExtEn; | ||
base.ext_zbf_supported = 0; | ||
base.ext_zbm_supported = 0; | ||
base.ext_zbp_supported = 0; | ||
base.ext_zbr_supported = 0; | ||
base.ext_zbs_supported = cva6_config_pkg::CVA6ConfigBExtEn; | ||
base.ext_zbt_supported = 0; | ||
base.ext_zcb_supported = cva6_config_pkg::cva6_cfg.RVZCB; | ||
base.ext_zifencei_supported = 1; | ||
base.ext_zicsr_supported = 1; | ||
base.ext_zicntr_supported = 1; | ||
|
||
base.mode_s_supported = cva6_config_pkg::cva6_cfg.RVS; | ||
base.mode_u_supported = cva6_config_pkg::cva6_cfg.RVU; | ||
|
||
base.pmp_supported = (cva6_config_pkg::cva6_cfg.NrPMPEntries > 0); | ||
base.pmp_regions = cva6_config_pkg::cva6_cfg.NrPMPEntries; | ||
base.debug_supported = cva6_config_pkg::cva6_cfg.DebugEn; | ||
|
||
return base; | ||
|
||
endfunction : cva6pkg_to_core_cntrl_cfg | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
`ifndef __UVMA_CVA6PKG_UTILS_PKG_SV__ | ||
`define __UVMA_CVA6PKG_UTILS_PKG_SV__ | ||
|
||
package uvma_cva6pkg_utils_pkg; | ||
|
||
import cva6_config_pkg::*; | ||
import uvma_core_cntrl_pkg::*; | ||
`include "uvma_cva6pkg_utils.sv" | ||
|
||
endpackage : uvma_cva6pkg_utils_pkg | ||
|
||
`endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
`ifndef __UVMA_RVFI_PKG_SV__ | ||
`define __UVMA_RVFI_PKG_SV__ | ||
|
||
// Pre-processor macros | ||
`ifdef VERILATOR | ||
`include "custom_uvm_macros.svh" | ||
`else | ||
`include "uvm_macros.svh" | ||
`endif | ||
|
||
package uvma_rvfi_pkg; | ||
|
||
`ifndef VERILATOR | ||
import uvm_pkg ::*; | ||
`endif | ||
import uvma_core_cntrl_pkg::*; | ||
|
||
`include "uvma_rvfi_constants.sv" | ||
`include "uvma_rvfi_tdefs.sv" | ||
`include "uvma_rvfi_utils.sv" | ||
|
||
endpackage : uvma_rvfi_pkg | ||
|
||
`endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters