I did UVM verification environment of FIFO. But I got the fatal message “Not able to Configure” while running.
AGENT
*****
local wrapper wiff;
local virtual intf intf_01;
function void connect_phase(uvm_phase phase);
super.connect_phase(phase);
if(!get_config_object ("wiff",obj,0))
begin
`uvm_fatal(get_type_name(),"Not able to configure");
end
else begin
if(!$cast(wiff , obj))
begin
`uvm_fatal(get_type_name(),"Object is not correct type");
end
else
intf_01 = wiff.intf_01;
end
if(is_active == UVM_ACTIVE)
begin
driver.seq_item_port.connect(sequencer.seq_item_export);
driver.intf_0 = wiff.intf_01;
end
endfunction
TOP
*****
wrapper wif;
initial begin
wif = new();
wif.set_wrapper(intf_01);
set_config_object("uvm_test_top.env.ag1", "wrapper", wif,0);
// uvm_config_db # (wrapper)::set(null,"uvm_test_top.env.ag1" , "wiff",wif) ;
run_test("base_test");
#200; $finish;
// #2000 global_stop_request;
end
I have tried with “wiff” instead of wrapper, that time also got same error.
I got the error message in agent module. Agent code for your reference.
uvm_object obj;
local wrapper wiff;
fifo_driver driver;
fifo_sequencer sequencer;
local virtual intf intf_01;
protected uvm_active_passive_enum is_active ;
function new (string name = "tc_fifo_agent", uvm_component parent = null);
super.new(name , parent);
endfunction
function void build_phase(uvm_phase phase);
int is_active_val = 0;
super.build_phase(phase);
if(!get_config_int ("is_active", is_active_val))
begin
this.is_active = uvm_active_passive_enum'(is_active_val);
end
if(is_active == UVM_ACTIVE)
begin
driver = fifo_driver::type_id::create("driver",this);
sequencer = fifo_sequencer::type_id::create("sequencer",this);
end
endfunction
function void connect_phase(uvm_phase phase);
super.connect_phase(phase);
if(!get_config_object ("wiff",obj,0))
begin
`uvm_fatal(get_type_name(),"Not able to configure");
end
else begin
if(!$cast(wiff , obj))
begin
`uvm_fatal(get_type_name(),"Object is not correct type");
end
else
intf_01 = wiff.intf_01;
end
if(is_active == UVM_ACTIVE)
begin
driver.seq_item_port.connect(sequencer.seq_item_export);
driver.intf_0 = wiff.intf_01;
end
endfunction
Break in Function uvm_pkg/uvm_report_object::die at /tools/questa10.1a/questa_sim/linux/../verilog_src/uvm-1.1a/src/base/uvm_report_object.svh line 277