Hi,
I would like to know why do p_sequencer and m_sequencer both are needed in OVM?
Can you please explain with a practical example where p_sequencer is used and where m_sequencer is used.
Thanks.
Hi,
I would like to know why do p_sequencer and m_sequencer both are needed in OVM?
Can you please explain with a practical example where p_sequencer is used and where m_sequencer is used.
Thanks.
m_sequencer is a handle of type ovm_sequencer_base
p_sequencer is a handle of the specific sequencer the sequence is running on
Please see:
http://verificationacademy.com/uvm-ovm/Ovm/ResourceAccessForSequences
for an explanation and an example
In reply to mperyer:
Why is the p_sequencer handle really needed when accessing resource for sequences? I refer to the linked page, quote:
Unfortunately, the m_sequencer handle cannot be used directly to access testbench resources, first it has to be cast to the type of the host sequencer.
Can’t we just use
m_sequencer.get_config_obj()
or
my_env_config::get_config(m_sequencer)
?
Hi,
sometimes you want to use resource that you defined such configuration values, or to run sequences on sub sequencers from the virtual sequencer current run on. for example:
task body(); bit prev_gsid_err_en_bit; //to return the prev value at the end of the seq `ovm_info(get_type_name(), "brdcst_rd_seq body() start", OVM_LOW); prev_gsid_err_en_bit = p_sequencer.m_env_cfg.m_vip_ovc_cfg.m_vip_monitor_cfg.m_err_on_gsid_rd; p_sequencer.m_geni_env_cfg.m_ovc_cfg.m_monitor_cfg.m_err_on_gsid_rd = 0;m_agent_brdcst_rd_seq.start(p_sequencer.m_vir_sqr.m_agent_sqr);
p_sequencer.m_env_cfg.m_vip_ovc_cfg.m_vip_monitor_cfg.m_err_on_gsid_rd = prev_gsid_err_en_bit;
`ovm_info(get_type_name(), "brdcst_rd_seq body() finish", OVM_LOW);
endtask