I am trying to apply reset from my driver, but I see that the run and reset phase are getting executed in parallel.
How to make use of reset phase ? and what is the difference between run and main phase ?
The code for reset phase is correct. When run_phase is called it executes the reset, configure, main and shutdown in sequential order, and pre and post are there for each of them, for support if any. Why you want to wait for the reset phase?
You are already initializing all inputs to zero. You mean to say that reset_phase is not coming out of reset_phase. Is your reset_phase is not completing?
my reset_phase is completing, but it executes in parallel with the run phase. But I don’t want that.
I want to understand the functionality of each phase - reset, configure, main, shutdown and how to implement them.
That’s why I have written the reset phase and applied my reset there.
The reset_phase is a sub-phase of the run_phase that executes in parallel. The main_phase is also a sub-phase of the run_phase that executes in parallel. However all of the sub-phases execute in serial order. You would not use the run_phase together with the sub-phrases
It would be much simpler to have a reset_sequence rather than deal with the UVM phases.
The answer of first one is given by Mr. Dave.
Lastly, as per protocol for example, if you need to configure, then implement the code. Similarly for main shutdown etc.