mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-24 13:57:19 -04:00
Change defaults for bad_intg on uninit accesses for Dmem/Imem
Imem : never create bad_intg on uninit access Dmem : by default, enable bad_intg on uninit access. Plusarg to change behaviour.
This commit is contained in:
parent
352f83fc74
commit
b06fb42ab8
3 changed files with 21 additions and 3 deletions
|
@ -21,7 +21,10 @@ class ibex_mem_intf_response_agent extends uvm_agent;
|
|||
|
||||
super.build_phase(phase);
|
||||
monitor = ibex_mem_intf_monitor::type_id::create("monitor", this);
|
||||
cfg = ibex_mem_intf_response_agent_cfg::type_id::create("cfg", this);
|
||||
if (cfg == null)
|
||||
if(!uvm_config_db #(ibex_mem_intf_response_agent_cfg)::get(this, "", "cfg", cfg))
|
||||
`uvm_fatal(`gfn, "Could not locate mem_intf cfg object in uvm_config_db!")
|
||||
|
||||
if(get_is_active() == UVM_ACTIVE) begin
|
||||
driver = ibex_mem_intf_response_driver::type_id::create("driver", this);
|
||||
sequencer = ibex_mem_intf_response_sequencer::type_id::create("sequencer", this);
|
||||
|
|
|
@ -37,7 +37,7 @@ class ibex_mem_intf_response_agent_cfg extends uvm_object;
|
|||
int unsigned zero_delay_pct = 50;
|
||||
|
||||
// CONTROL_KNOB : enable/disable to generation of bad integrity upon uninit accesses
|
||||
bit enable_bad_intg_on_uninit_access = 1;
|
||||
bit enable_bad_intg_on_uninit_access = 0;
|
||||
|
||||
constraint zero_delays_c {
|
||||
zero_delays dist {1 :/ zero_delay_pct,
|
||||
|
@ -56,7 +56,6 @@ class ibex_mem_intf_response_agent_cfg extends uvm_object;
|
|||
|
||||
function new(string name = "");
|
||||
super.new(name);
|
||||
void'($value$plusargs("enable_bad_intg_on_uninit_access=%0d", enable_bad_intg_on_uninit_access));
|
||||
endfunction
|
||||
|
||||
endclass
|
||||
|
|
|
@ -9,6 +9,8 @@ class core_ibex_base_test extends uvm_test;
|
|||
core_ibex_env env;
|
||||
core_ibex_env_cfg cfg;
|
||||
core_ibex_cosim_cfg cosim_cfg;
|
||||
ibex_mem_intf_response_agent_cfg imem_cfg;
|
||||
ibex_mem_intf_response_agent_cfg dmem_cfg;
|
||||
virtual clk_rst_if clk_vif;
|
||||
virtual core_ibex_dut_probe_if dut_vif;
|
||||
virtual core_ibex_instr_monitor_if instr_vif;
|
||||
|
@ -146,6 +148,20 @@ class core_ibex_base_test extends uvm_test;
|
|||
|
||||
uvm_config_db#(core_ibex_cosim_cfg)::set(null, "*cosim_agent*", "cosim_cfg", cosim_cfg);
|
||||
|
||||
imem_cfg = ibex_mem_intf_response_agent_cfg::type_id::create("imem_cfg", this);
|
||||
dmem_cfg = ibex_mem_intf_response_agent_cfg::type_id::create("dmem_cfg", this);
|
||||
// Never create bad integrity bits in response to accessing uninit memory
|
||||
// on the Iside, as the Ibex can fetch speculatively.
|
||||
imem_cfg.enable_bad_intg_on_uninit_access = 0;
|
||||
// By default, enable bad_intg on the Dside (read plusarg to overwrite this behaviour)
|
||||
dmem_cfg.enable_bad_intg_on_uninit_access = 1;
|
||||
void'($value$plusargs("enable_bad_intg_on_uninit_access=%0d",
|
||||
dmem_cfg.enable_bad_intg_on_uninit_access));
|
||||
uvm_config_db#(ibex_mem_intf_response_agent_cfg)::
|
||||
set(this, "*instr_if_response_agent*", "cfg", imem_cfg);
|
||||
uvm_config_db#(ibex_mem_intf_response_agent_cfg)::
|
||||
set(this, "*data_if_response_agent*", "cfg", dmem_cfg);
|
||||
|
||||
uvm_config_db#(core_ibex_env_cfg)::set(this, "*", "cfg", cfg);
|
||||
mem = mem_model_pkg::mem_model#()::type_id::create("mem");
|
||||
// Create virtual sequence and assign memory handle
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue