I am adding a new agent to my TB to support 2 test cases
I want to keep this new agent as active for only these 2 tests.
Instead of adding
uvm_config_db#(uvm_active_passive_enum)::(this, "m_env.my_agent", "is_active", UVM_PASSIVE)
to all other test cases, I would like to add the UVM_PASSIVE set up to base class
class base_test extends uvm_test;
function void build_phase(uvm_phase phase);
super.build_phase(phase);
m_env = env::type_id::create("my_env",this);
uvm_config_db#(uvm_active_passive_enum)::(this, "m_env.my_agent", "is_active", UVM_PASSIVE)
endfunction : build_phase
.........
endclass : base_test
In this case, can I make agent as active for the 2 tests such that is_active variable set in base_test will be overridden.
class error_test extends base_test;
function void build_phase(uvm_phase phase);
super.build_phase(phase);
m_env = env::type_id::create("my_env",this);
uvm_config_db#(uvm_active_passive_enum)::(this, "m_env.my_agent", "is_active", UVM_ACTIVE)
endfunction : build_phase
.........
endclass : error_test