Hi
I am new to UVM and I am getting following error.
Can anybody please help me out
my_sequencer#(my_trans) sequencer
ncvlog: *E,CLSMIP (./sv/my_agent.sv,25|34): Too many class instance parameter assignments.
Thanks in advance
Hi
I am new to UVM and I am getting following error.
Can anybody please help me out
my_sequencer#(my_trans) sequencer
ncvlog: *E,CLSMIP (./sv/my_agent.sv,25|34): Too many class instance parameter assignments.
Thanks in advance
In reply to cashah85:
class my_agent extends uvm_agent;
uvm_active_passive_enum is_active = UVM_ACTIVE;
my_sequencer#(my_trans) sequencer;
my_driver driver;
`uvm_component_utils_begin(my_agent)
`uvm_field_enum(uvm_active_passive_enum,is_active,UVM_ALL_ON)
`uvm_component_utils_end
// Constructor - UVM required syntax
function new(string name , uvm_component parent);
super.new(name, parent);
endfunction // new
// UVM build phase
function void build_phase(uvm_phase phase);
super.build_phase(phase);
if(is_active == UVM_ACTIVE)begin
driver = my_driver::type_id::create("driver", this);
sequencer = my_sequencer#(my_trans)::type_id::create("sequencer", this);
end
endfunction // build_phase
// UVM Connect phase
function void connect_phase(uvm_phase phase);
super.connect_phase(phase);
if(is_active == UVM_ACTIVE)begin
`uvm_info(get_type_name(), "DRIVER SQR CONNECTION", UVM_LOW)
driver.seq_item_port.connect(sequencer.seq_item_export);
end
endfunction // connect_phase
endclass // my_agent
In reply to dv_engr:
Where is my_sequencer defined? It looks like you are trying to use a parameter (my_trans) with a non-parameterized class (my_sequencer).
You should always use the default uvm_sequencer, so you should have:
uvm_sequencer#(my_trans) sequencer;
and create it in the build phase with:
sequencer = uvm_sequencer#(my_trans)::type_id::create("sequencer", this);