cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
j1s1e1
Observer
Observer
426 Views
Registered: ‎03-05-2010

UVM Bug with uvm_reg_predictor

When running a UVM simulation using a uvm_reg_predictor, the simulator hangs in the following function

static function this_type get();
if (me == null) begin
uvm_coreservice_t cs = uvm_coreservice_t::get();
uvm_factory factory=cs.get_factory();
me = new;
factory.register(me);
end
return me;                                                                 // Simulator stops here, me was not null
endfunction

 

Vivado Simulator kernel has discovered an exceptional condition

 

The problem is apparently that the parameterized class is not properly registered.  Typically, a typedef is used like this:

typedef uvm_reg_predictor#( jelly_bean_transaction ) jelly_bean_reg_predictor;

When I used an alternate method of creating the specialized class as follows:

class jelly_bean_reg_predictor extends uvm_reg_predictor#(jelly_bean_transaction );
`uvm_component_utils(jelly_bean_reg_predictor)

function new(string name= "",uvm_component parent=null);
super.new(name,parent);
endfunction:new
endclass

the class is registered and the error goes away.

The complete example is available here (MIT License):

https://github.com/cluelogic/uvm-tutorial-for-candy-lovers/blob/master/src/tutorial_9.sv

There are additional examples there that run in Vivado with just the -L uvm switch and inserting the test name in run_test().  I verified tutorial_21.

I assume the example works as is in other simulators as is, since it has been posted without complaints since 2016.

Hopefully, the typedef method can be implemented in the next update (currently tested using 2020.1)

Thanks,

James

 

 

Tags (1)
0 Kudos
0 Replies