Hi,
I’ll be appreciate for any help. I’ve the case where I use my reg_model. I use a handle of it in my reg sequence. The slice of code is
class sys_base_reg_sequence extends uvm_sequence;
function new(string name=“sys_base_reg_sequence”);
super.new(name);
endfunction
sys_reg_block reg_model;
.........
virtual task body();
uvm_status_e status;
reg_model.lctrl_ch0.write(.status(status), .value(lanes_ch0), .parent(this));
...............
I create ‘sys_reg_block’ in the environment like this:
// UVM_REG - Register Model
sys_reg_block reg_model;
reg_model = sys_reg_block::type_id::create("reg_model");
reg_model.build();
reg_model.lock_model();
uvm_config_object::set(this, "*", "reg_model", reg_model);
......................
I declared the environment in the test, but due simulation an error is occured
Error-[NOA] Null object access
uvm/sequences/sys_reg_sequence_library.sv, 123
The object is being used before it was constructed/allocated.
Please make sure that the object is newed before using it.
The line 123 is
reg_model.lctrl_ch0.write(.status(status), .value(lanes_ch0), .parent(this));
So don’t understand why ‘reg_model’ is unvisible in the ‘sys_base_reg_sequence’?