Trying to get a component from hierarchical reference name instead uvm_top.find()
if(!$cast(env_s, uvm_top.find("uvm_test_top.env_o"))) `uvm_error(get_name(), "env_o is not found");
Aseq.start(env_s.v_seqr.seqr_A);
So I checked UVM testbench topology:
------------------------------------------------------------
Name Type Size Value
--------------------------------------------------------------
uvm_test_top base_test - @1849
env_o env - @1916
agt_A core_A_agent - @1948
drv_A core_A_driver - @2666
rsp_port uvm_analysis_port - @2770
seq_item_port uvm_seq_item_pull_port - @2718
seqr_A core_A_sequencer - @2803
rsp_export uvm_analysis_export - @2862
seq_item_export uvm_seq_item_pull_imp - @3422
arbitration_queue array 0 -
lock_queue array 0 -
num_last_reqs integral 32 'd1
num_last_rsps integral 32 'd1
agt_B core_B_agent - @1979
drv_B core_B_driver - @3473
rsp_port uvm_analysis_port - @3574
seq_item_port uvm_seq_item_pull_port - @3525
seqr_B core_B_sequencer - @3605
rsp_export uvm_analysis_export - @3663
seq_item_export uvm_seq_item_pull_imp - @4215
arbitration_queue array 0 -
lock_queue array 0 -
num_last_reqs integral 32 'd1
num_last_rsps integral 32 'd1
v_seqr virtual_sequencer - @2010
rsp_export uvm_analysis_export - @2071
seq_item_export uvm_seq_item_pull_imp - @2633
arbitration_queue array 0 -
lock_queue array 0 -
num_last_reqs integral 32 'd1
num_last_rsps integral 32 'd1
--------------------------------------------------------------
When I ran with uvm_test_top.env_o.v_seqr.seqr_A as the below I got the error message.
How do I correctly get a component from hierarchical name?
//if(!$cast(env_s, uvm_top.find("uvm_test_top.env_o"))) `uvm_error(get_name(), "env_o is not found");
//Aseq.start(env_s.v_seqr.seqr_A);
Aseq.start(uvm_test_top.env_o.v_seqr.seqr_A);
** Error (suppressible): sequence.sv(63): (vopt-7063) Failed to find ‘uvm_test_top’ in hierarchical name ‘$root.uvm_test_top.env_o.v_seqr.seqr_A’.
Region: testbench_sv_unit.virtual_seq.
For your understand With Virtual Sequnce & virtual seqcr (Not p_se(1) - EDA Playground I implemented it.