Uvm_sequencer setup

Hello everybody,

Just have a couple of questions regarding how I set up my sequencer module in UVM.

class the_sequencer extends uvm_sequence#(theseq_item);
    `uvm_component_utils(the_sequencer)
    
    function new(string path = "the_sequencer", uvm_component parent = null);
        super.new(path, parent);

    endfunction

    virtual function void build_phase(uvm_phase phase);
        super.build_phase(phase);

    endfunction


endclass

I made a sequencer like the above, and when I ran VCS simulation on my top level, this was the error I got:

Error-[TMAFTC] Too many arguments to function/task call
ex_sequencer.sv, 5
“uvm_sequence::new(path, parent)”
The above function/task call is done with more arguments than needed.

Error-[MFNF] Member not found
ex_sequencer.sv, 10

So I literally got all my guidance from this EDA playground website, in case more code is needed, the following link can be of help: UVM_Adder_TB - EDA Playground

I just need some help understanding why the sequencer would say there’s too many arguments in the sequencer’s new function and the build_phase doesn’t exist in sequencer.

Thanks!

Sangwoo

Your problem is here:

class the_sequencer extends uvm_sequence#(theseq_item);

You are extending your sequencer from uvm_sequence.
uvm_sequence is an uvm_object, but the sequencer should be uvm_component.
Finally you do not need to create a specific component for your sequencer.
You can use a simple typedef:

typedef uvm_sequencer #(theseq_item) the_sequencer;