# Integrated Phase Control - VMM-on-top

This class is used to ensure OVM components (i.e. all subtypes of ovm_component), when instantiated in VMM environments and/or components, have their phase methods called at the correct time relative to the execution of the top-level VMM environment phase methods.

With VMM_OVM_INTEROP defined, OVM phasing is controlled by the avt_vmm_ovm_env as follows:

>          VMM                 OVM
>          |
>        gen_cfg
>          |
>         build________________build
>                ovm_build       |
>                              connect
>           _____________________/
>          |
>          |_____________end_of_elaboration
>                                |
>                        start_of_simulation
>           _____________________/
>          |
>          |
>          |\__FORK run phase__
>          |                    \
>        reset_dut              run
>          |                     |
>        cfg_dut                 |
>          |                     |
>        start                   |
>          |                     |
>     wait_for_end               |
>          |                     |
>          |_ stop  --> FORK     |
>          | request        \    |
>          |               stop  |
>          |                 |   |
>          |                 |-->X
>          |__ WAIT -------> *
>              for run
>           ___/  complete
>        stop
>          |
>       cleanup
>          |
>          |
>        report
>          |___________________extract
>              ovm_report        |
>                               check
>                                |
>                              report
>                                |
>                              <user>
>                                |
>           _____________________*
>          |
>     <final report>
>          |
>          *

Summary

Integrated Phase Control - VMM-on-top
This class is used to ensure OVM components (i.e.

## avt_vmm_ovm_env

This class is used to automatically integrate OVM phasing with VMM phasing in a VMM-on-top environment.

Summary

avt_vmm_ovm_env
This class is used to automatically integrate OVM phasing with VMM phasing in a VMM-on-top environment.
Class Hierarchy
`AVT_VMM_OVM_ENV_BASE
avt_vmm_ovm_env
Class Declaration
> class avt_vmm_ovm_env extends `AVT_VMM_OVM_ENV_BASE
Methods |
new | Creates a new instance of an avt_vmm_ovm_env.
ovm_build | Calls into the OVM’s phasing mechanism to complete OVM’s build, connect, and any other user-defined phases up to end_of_elaboration.
ovm_report | Calls into the OVM’s phasing mechanism to complete OVM’s extract, check, and report phases.
reset_dut | Syncs the start of VMM reset_dut with the start of OVM run phase, then forks OVM run phase to run in parallel with reset_dut, config_dut, start, and wait_for_end.
stop | Requests the OVM run phase to stop if it is still running, then waits for the OVM run phase to finish.
report | Calls into the OVM’s phasing mechanism to execute user-defined OVM phases inserted after report_ph, if any.
Macros |
`ovm_build | Overrides the avt_vmm_ovm_env’s ovm_build method such that the call to advance OVM phasing up to end_of_elaboration is performed only once in the most derived env-subtype of a a potentially deep vmm_env-inheritance hierarchy.

### Methods

### new

> function new( | string | name | = | "Verif Env" `VMM_ENV_BASE_NEW_EXTERN_ARGS | )

Creates a new instance of an avt_vmm_ovm_env.

### ovm_build

> virtual function void ovm_build()

Calls into the OVM’s phasing mechanism to complete OVM’s build, connect, and any other user-defined phases up to end_of_elaboration.

### ovm_report

> virtual task ovm_report()

Calls into the OVM’s phasing mechanism to complete OVM’s extract, check, and report phases.

### reset_dut

> virtual task reset_dut()

Syncs the start of VMM reset_dut with the start of OVM run phase, then forks OVM run phase to run in parallel with reset_dut, config_dut, start, and wait_for_end.

### stop

> virtual task stop()

Requests the OVM run phase to stop if it is still running, then waits for the OVM run phase to finish.

### report

> virtual task report()

Calls into the OVM’s phasing mechanism to execute user-defined OVM phases inserted after report_ph, if any.

### Macros

### `ovm_build

Overrides the avt_vmm_ovm_env’s ovm_build method such that the call to advance OVM phasing up to end_of_elaboration is performed only once in the most derived env-subtype of a a potentially deep vmm_env-inheritance hierarchy.

> class avt_vmm_ovm_env extends `AVT_VMM_OVM_ENV_BASE

This class is used to automatically integrate OVM phasing with VMM phasing in a VMM-on-top environment.

> function new( | string | name | = | "Verif Env" `VMM_ENV_BASE_NEW_EXTERN_ARGS | )

Creates a new instance of an avt_vmm_ovm_env.

> virtual function void ovm_build()

Calls into the OVM’s phasing mechanism to complete OVM’s build, connect, and any other user-defined phases up to end_of_elaboration.

> virtual task ovm_report()

Calls into the OVM’s phasing mechanism to complete OVM’s extract, check, and report phases.

> virtual task reset_dut()

Syncs the start of VMM reset_dut with the start of OVM run phase, then forks OVM run phase to run in parallel with reset_dut, config_dut, start, and wait_for_end.

> virtual task stop()

Requests the OVM run phase to stop if it is still running, then waits for the OVM run phase to finish.

> virtual task report()

Calls into the OVM’s phasing mechanism to execute user-defined OVM phases inserted after report_ph, if any.