the command for creating your Transaction object has only 1 Argument of type string. The string has to be the same as the object is named.
tr = trans::type_id::create(“tr”);
In the monitor, the error is resolved with the following two changes:
I changed the new function in transaction class to the following:
function new(string name = "trans"); // earlier it was "" only.
super.new(name);
endfunction
Putting "
this
" in
type_id::create()
function, called in the monitor.sv class.
Now the same error is there in test.sv class. I am not able to resolve it with above hack.
Could you please help me in understanding that my above hack is wrong or not. I think my above hack is making sense, But it is not working in test.sv class. Please help.
class three_seq extends uvm_sequence#(trans);
rand int unsigned num_jelly_bean_flavors; // knob
constraint num_jelly_bean_flavors_con { num_jelly_bean_flavors inside { [2:3] }; }
function new(string name = "");
super.new(name);
endfunction: new
task body();
two_seq jb_seq;
repeat (num_jelly_bean_flavors) begin
jb_seq = two_seq::type_id::create("jb_seq",get_full_name());
assert(jb_seq.randomize());
jb_seq.start(.sequencer(m_sequencer), .parent_sequence(this));
end
endtask: body
`uvm_object_utils_begin(three_seq)
`uvm_field_int(num_jelly_bean_flavors, UVM_ALL_ON)
`uvm_object_utils_end
endclass: three_seq
In the trans.sv, one_seq, two_seq, and three_seq files, the new constructor have only the “” for string.
Could you please relate something workable.
-Sunils