返回介绍

28.5.2 Assertion control

发布于 2020-09-09 22:56:01 字数 2882 浏览 851 评论 0 收藏 0

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.

Usage 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(vpiAssertionEnable, assertionHandle)

vpiAssertionEnable

enables starting new attempts for this assertion. This has no effect if assertion already enabled or on any existing attempts.

— For the following operators, the second argument shall be a valid assertion handle and the third argument shall be an attempt start-time (as a pointer to a correctly initialized s_vpi_time structure).

Usage example: vpi_control(vpiAssertionKill, assertionHandle, attemptStartTime)

vpiAssertionKill

discards the given attempts, but leaves the assertion enabled and does not reset any state used by this assertion (e.g., past() sampling).

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.

— For the following operator, the second argument shall be a valid assertion handle, the third argument shall be an attempt start-time (as a pointer to a correctly initialized s_vpi_time structure) and the fourth argument shall be a step control constant.

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

vpiAssertionEnableStep

enables step callbacks to occur for this assertion attempt. By default, stepping is disabled for all assertions. 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. The stepping mode of any particular attempt cannot be modified after the assertion attempt in question has started.

NOTE—In this release, the only step control constant available is vpiAssertionClockSteps, indicating callbacks on a per assertion/clock-tick basis. The assertion clock is the event expression supplied as the clocking expression to the assertion declaration. The assertion shall “advance” whenever this event occurs and, when stepping is enabled, such events shall also cause step callbacks to occur.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文