it’s compiled now, but with fatal error shown below,
code: if (!uvm_config_db#(virtual ac_lpc_if)::get(this, “”, “vif”, vif)) begin
`uvm_fatal(“ac_lpc_agent”, “No virtual interface specified for this agent instance”)
Error: uvm_test_top.env.agent [ac_lpc_agent] No virtual interface specified for this agent instance
It seems there is no uvm_config_db set command from the toplevel module of your UVM testbench or you are limiting the access by specifying a wrong hierarchical Path in the set Command.
If you want to retrieve a value from the config_db using the get command, you have to perform a set command to the config_db, to make sure there is a corresponding value in the config_db.
For the virtual interface the set will be done in the toplevel module of your UVM testbench.
You are getting this error because for every uvm_config_db get, there must be a corresponding set from the higher hierarchy. Looks like you have missed to set this interface from your TB Top. Please check for similar set code in your TB top:
Also you can refer to some examples of set-get and complete UVM environment from below links. I would suggest you to go through these examples and videos.
Can you try after changing
uvm_config_db#(virtual ac_lpc_if)::set( this, “env”, “vif”, vif);
to
uvm_config_db#(virtual ac_lpc_if)::set( this, “*”, “vif”, vif);
Giving * will make sure all the below hierarchy components can get from higher hierarchy.
Looks a Little bit strange, because you never mentioned ‘test_seqcreate’.
My guess is your code does not look like this:
test_seq = ac_lpc_tx_seq::type_id::create(“test_seq”,this)
In reply to Prawin kumar:
Is the sequence compatible with the sequencer? It looks like it is not. Does the sequence generate the same seq_items as the sequencer is parameterized?
if (!uvm_config_db#(virtual ac_lpc_if)::get(this, "", "vif", vif)) begin
`uvm_fatal("ac_lpc_env", "No virtual interface specified for this env instance")
end
uvm_config_db#(virtual ac_lpc_if)::set( this, "agent", "vif", vif);
endfunction
function void connect_phase(uvm_phase phase);
driver.drv_to_sb.connect(scoreboard.input_fifo.analysis_export);
monitor.item_collected_port.connect(scoreboard.output_fifo.analysis_export);
endfunction
endclass: ac_lpc_env
Why are you creating a driver and monitor (and sequencer?) in your environment? You are creating an agent which should contain these components. In your environment, you should only create the agent and scoreboard.
Because am made connections of driver to scoreboard and monitor to scoreboard in environment only. that’s why am creating agent components in environment also …
we cannot connect components without create right.