In reply to shanthi:
In sequence you will have a pointer m_sequencer(uvm_sequncer_base handle), which will point to the sequencer on which the sequence is started, using that pointer we can access the properties & methods of sequencer inside the sequence.
class ahb_sequence extends uvm_sequence#(ahb_xtn);
task body();
m_sequencer.lock();// m_sequencer points to the sequencer on which ahb_sequence is
//started i.e., ahb_sequencer
....
endtask
endclass
Regards,
Shanthi
www.maven-silicon.com
Hi Shanti,
From my understanding m_sequencer points todefault sequencer i.e uvm_sequencer_base. In order to get access to any other sequencer component we need p_sequencer and then type cast it?
class ahb_sequence extends uvm_sequence#(ahb_xtn);
ahb_sequencer p_sequencer;
task pre_body();
$cast(p_sequncer, m_sequencer);
endtask
task body();
m_sequencer.lock();// m_sequencer points to the sequencer on which ahb_sequence is
//started i.e., ahb_sequencer
....
endtask
endclass