In reply to chr_sue:
In reply to Sv-hustler:
Using main_phase and run_phase in the same UVM testbench together is a bad coding style and might cause problems.
In parallel to run_phase sub-phases are executed, starting with the pre_reset_phase and finishing with the post_shutdown_phase. run_phase starts with the pre_reset_phase and finishes with the post_shutdown_phase.
See the details here https://verificationacademy.com/cookbook/phasing
Why using main_phase and run_phase is a problem?
Can you provide any example, artical for that problem?
Subphases are normally used to handle particular traffic to DUT such as:
- Handle reset in reset_phase
- Handle configuration (register) in configure_phase
- Handle stimulus in main_phase
While run_phase is useful specially in driver, monitor, scoreboard where we need to handle every type of traffic from pre_reset to post_shutdown.