<- Click here to Toggle

Home » Resources » SystemVerilog Assertion API » Control Functions

SystemVerilog Assertion API - Control Functions

This section defines how to obtain assertion system control and assertion control information.

Assertion system control

Use vpi_control() , with one of the following operators and no other arguments, to obtain assertion system control information.

Usage example: vpi_control(vpiAssertionSysReset)

vpiAssertionSysReset discards all attempts in progress for all assertions and restore the entire assertion system to its initial state. Any pre-existing vpiAssertionStepSuccess and vpiAssertionStepFailure callbacks shall be removed; all other assertion callbacks shall remain.

Usage example: vpi_control(vpiAssertionSysStop)

vpiAssertionSysStop considers all attempts in progress as unterminated and disable any further assertions from being started. This control has no effect on pre-existing assertion callbacks.

Assertion control

Use vpi_control() , with one of the following operators, to obtain assertion control information.

For the following operators, the second argument shall be a valid assertion handle.

Usage example: vpi_control(vpiAssertionReset, assertionHandle)

vpiAssertionReset discards all current attempts in progress for this assertion and resets this assertion to its initial state.

example: vpi_control(vpiAssertionDisable, assertionHandle)

vpiAssertionDisable disables the starting of any new attempts for this assertion. This has no effect on any existing attempts. or if the assertion already disabled. By default, all assertions are enabled.

Usage example: vpi_control(vpiAssertionDisableStep,assertionHandle, attemptStartTime)

vpiAssertionDisableStep Disables step callbacks for this assertion. This has no effect if stepping not enabled or it is already disabled.

Usage example: vpi_control(vpiAssertionEnableStep,assertionHandle, attemptStartTime, vpiAssertionClockSteps)

vpiAssertionEnableStep Enables step callbacks to occur for this assertion attempt. This call has no effect if stepping is already enabled for this assertion and attempt, other than possibly changing the stepping mode for the attempt if the attempt has not occurred yet.