Hi,
I wrote a simple RAL code, link : My Basic RAL Code
I am confused about sending something via uvm_config_db to a spesific component. For example.
I use get in agent for uvn_config db to take is_active from test:
// get from test config_db whether the agent will be active
if(!uvm_config_db#(uvm_active_passive_enum)::get(this, "", "is_active", is_active))
`uvm_fatal(get_type_name,"agent activity couldn't be taken")
And later I check whether is active or not:
//get_is_active --> Returns UVM_ACTIVE is the agent is acting as an active agent and UVM_PASSIVE if it is acting as a passive agent.
if(get_is_active() == UVM_ACTIVE) begin
// = if(is_active == UVM_ACTIVE) uvm_agent has an internal variable called is_active which is of enum type uvm_active_passive_enum.By default, all agents are active.
driver = dma_driver::type_id::create("driver", this);
sequencer = dma_sequencer::type_id::create("sequencer", this);
end
else begin
`uvm_fatal("AGENT", "AGENT IS PASSIVE")
end
If I sent from test with “" it is okay. As far as I know, "” is wildcard and means all classes below test as direction.
// set agent activity from test to agent via config db -------------
// is_active is a variable inside agent defaultly, which is uvm_active_passive_enum - enum type.
uvm_config_db#(uvm_active_passive_enum)::set(this, "*", "is_active", UVM_ACTIVE); //--> to all below test
But when I tried to sent only to agent I took error. It couldn’t get it to agent.
uvm_config_db#(uvm_active_passive_enum)::set(this, "*.dma_agnt.*", "is_active", UVM_ACTIVE);
I also tried that given below but the result is the same, error.
uvm_config_db#(uvm_active_passive_enum)::set(this, "*.dma.env.dma_agnt", "is_active", UVM_ACTIVE);
Thanks,
Hakan