P_sequencer vs m_sequencer real use cases

Hi All,

I need your inputs on difference between p_sequencer vs m_sequencer with respect to real use cases in verification environment.
I often read following terminology:

-p_sequencer is type specific sequencer while m_sequencer is generic sequencer. But that is not helping me to get this concept to understand practically.

What is the limitation of m_sequencer?
Are virtual sequences and virtual sequencer always work with p_sequencer?

Example with respect to real use cases are appreciated.

Thanks,
Geet

In reply to Geet:

What is the limitation of m_sequencer?
→ if you want to access user defined properties/methods of sequencer in sequence then we can’t use m_sequencer

Are virtual sequences and virtual sequencer always work with p_sequencer?
→ not exactly , that all depends upon implementation
in simple terms, a virtual sequencer/virtual sequence is class that doesn’t belong any particular sequence_item/txn type

example without p_sequencer but using virtual sequencer:

class vsqr extends uvm_sequencer;

axi_seqr i_axi_seqr;
abp_seqr i_axi_seqr;

endclass

class vseq extends uvm_sequence;
top_env i_env;
txn_seq i_seq
task body();
i_seq = txn_seq::type_id::create(“i_seq”);
i_seq.start(i_env.i_axi_seqr);
endtask
endcalss

class my_test extends uvm_test;
virtual function void build_phase(uvm_phase phase);

env = top_env::type_id::create(“env”);
endtask
task main_phase(uvm_phase phase);
i_vseq = i_vseq::type_id::create(“i_vseq”);
i_vseq.i_env = env;
i_vseq.start();
endtask
endclass

Hope this helps

In reply to Desam:

Hi Desam,

Thanks for reply. Can you point some examples for which I can get idea for user defined methods/properties which you explained for 1st quetion?

Or in other words which is only a use case that “must” be done with the p_sequencer?
If you can add pseudo code/reference.

In reply to Geet:

see if below link helps

In reply to Desam:

Thanks Desam, That information is helpful.