Hi,
Any suggestions on how to best debug problems with set_config_int(). I created a new env and am trying to set a config bit in a driver, but it’s not getting set. I checked for typos, the path is correct, and the bit in question is defined in the `ovm_field_int macro.
Here are some snippets of code
class axi_master_driver extends ovm_driver #(axi_burst);
// Config for read/write driver enabled. Some masters may only drive read
// or write channels. Default to enabled(1) for each.
bit read_master_enable = 1;
bit write_master_enable = 1;
// OVM Macros
`ovm_component_utils_begin(axi_master_driver)
`ovm_field_int(read_master_enable, OVM_ALL_ON)
`ovm_field_int(write_master_enable, OVM_ALL_ON)
`ovm_component_utils_end
class axi_master_agent extends ovm_agent;
ovm_active_passive_enum is_active = OVM_ACTIVE;
// Declarations for agent sub-components
axi_monitor monitor;
axi_master_driver driver;
axi_master_sequencer sequencer;
// OVM Macros
`ovm_component_utils_begin(axi_master_agent)
`ovm_field_int(is_active, OVM_ALL_ON)
`ovm_component_utils_end
// Constructor
function new(string name, ovm_component parent);
super.new(name,parent);
endfunction
// OVM build()
virtual function void build();
super.build();
monitor = axi_monitor::type_id::create("monitor",this);
if (is_active == OVM_ACTIVE) begin
// Build the sequencer and driver.
sequencer = axi_master_sequencer::type_id::create("sequencer",this);
driver = axi_master_driver::type_id::create("driver",this);
end
endfunction : build
// Top-Level Verification Environment
class top_env extends ovm_env;
axi_master_agent axi_wr_master;
function void build();
super.build();
set_config_int("axi_wr_master.sequencer", "count", 0);
set_config_int("axi_wr_master.driver", "read_master_enable", 0);
axi_wr_master = axi_master_agent::type_id::create("axi_wr_master", this);
axi_wr_master.build();
end
-Doug