返回介绍

30.8.4.2 Jump Behavior

发布于 2020-09-09 22:56:03 字数 2198 浏览 833 评论 0 收藏 0

Jump behavior refers to the behavior of vpi_goto() with a vpiTime control constant, vpiTrvsObj type, and a jump time argument. The user specifies a time to which he or she would like the traverse handle to jump, but the specified time might or might not have value changes. In that case, the traverse handle shall point to the latest VC equal to or less than the time requested.

In the example below, the whole simulation run is from time 10 to time 65, and a variable has value changes at time 10, 15 and 50. If a value change traverse handle is associated with this variable and a jump to a different time is attempted, the result shall be determined as follows:

  • Jump to 12; traverse handle return time is 10.
  • Jump to 15; traverse handle return time is 15.
  • Jump to 65; traverse handle return time is 50.
  • Jump to 30; traverse handle return time is 15.
  • Jump to 0; traverse handle return time is 10.
  • Jump to 50; traverse handle return time is 50.
If the jump time has a value change, then the internal index of the traverse handle shall point to that time. Therefore, the return time is exactly the same as the jump time.

If the jump time does not have a value change, and if the jump time is not less than the minimum time of the whole trace2 run, then the return time is aligned backward. If the jump time is less than the minimum time, then the return time shall be the minimum time. In case the object has hold value semantics between the VCs such as static variables, then the return of vpi_goto() (with a specified time argument to jump to) is a new handle pointing to that time to indicate success. In case the time is greater than the trace maximum time, or when an automatic object or an assertion or any other object that does not hold its value between the VCs then the return code should indicate failure (and the backward time alignment is still performed). In other words the time returned by the traverse object shall never exceed the trace maximum; the maximum point in the trace is not marked as a VC unless there is truly a value change at that point in time (see the example in this subsection).

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

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

发布评论

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