I know that for sequences, the new() method does not need a parent field, and im sure im only passing a string to the new field of the sequence. When i run the test using the type_id create method i get an error saying “Formal argument parent is missing in the task/functio call…”, and if i use the new() method instead, i got the error “too many actual arguments…” both errors are referring to the same code line which is the new() method in the sequence shown below.
This is my tests code which extends from base_test:
class bram_test1_test extends bram_base_test;
`uvm_component_utils(bram_test1_test)
bram_vsqr1_vseq vsqr1_vseq;
function new(string name = "", uvm_component parent);
super.new(name,parent);
endfunction
function void build_phase(uvm_phase phase);
super.build_phase(phase);
//vsqr1_vseq = new("vsqr1_vseq");
vsqr1_vseq = bram_vsqr1_vseq::type_id::create("vsqr1_vseq");
endfunction
task run_phase(uvm_phase phase);
phase.raise_objection(this);
vsqr1_vseq.assign_seqr(env1_env.vsqr1_virsqr.get_sequencer("sqr1_sqr"));
for(int i = 0; i < 10; i++) begin
vsqr1_vseq.start(null);
end
#40;
phase.drop_objection(this);
endtask
endclass
And this is the virtual sequence im running:
class bram_vsqr1_vseq extends uvm_sequence;
`uvm_component_utils(bram_vsqr1_vseq)
bram_sqr1_myseq myseq_seq;
uvm_sequencer_base sqr1_sqr;
function new(string name = "vsqr1_vseq");
super.new(name);
endfunction
function void assign_seqr(uvm_sequencer_base sqr1_seqr);
$cast(this.sqr1_sqr,sqr1_seqr);
endfunction
task body();
fork
join
repeat(10) begin
`uvm_do_on(myseq_seq,sqr1_sqr)
end
endtask
endclass
im pretty sure i only have one field in the new method of the sequence, i also check that the name of the files match the name of the classes, but i still cannot figura out why in getting those errors.