@MichaelP
Thank you for sharing the DVCon paper. Yes. Chapter VI “Phase Aware Configuration” is the case that static area needs to know UVM phases. In this case, an UVM component class is instantiated in an interface. I also found such a proposal in the past post of this forum.
I have updated the EDA playground.
UVM Phase State Wait In A Module
It includes three UVM phase ways now.
- WAIT_FOR_NBA_REGION
- UVM_RUN_PHASE // Doesn’t Work!!!
- COMMON_DOMAIN_RUN_PHASE
Although I cannot share codes which use uvm_wait_for_nba_region() in the actual projects, you can find in in my published GitHub repo.
uvm_wait_for_nba_region() is used in TB2/test_bench.sv of it.
I would choose COMMON_DOMAIN_RUN_PHASE way from now on. I might put it in my own custom uvm package library for more generic usage.
I.e)
package my_custom_uvm_pkg;
import uvm_pkg::*;
...
task automatic wait_run_phase(wait_state=UVM_PHASE_STARTED);
uvm_phase run_phase;
run_phase = uvm_domain::get_common_domain().find(uvm_run_phase::get());
run_phase.wait_for_state(wait_state);
endtask
...
endpackage