返回介绍

30.11 VPI routines extended in SystemVerilog

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

Table 30-1 lists the usage extensions. They are repeated here the additional extended usage with traverse (collection) handles of vpi_get_time() for clarity.

vpi_get_time()
Synopsis: Retrieve the time of the object or collection of objects traverse handle.
Syntax: vpi_get_time(vpiHandle obj, p_vpi_time time_p)
Returns: PLI_INT32, 1 for success, 0 for fail.
Arguments:
vpiHandle obj: Handle to a traverse object of type vpiTrvsObj or a traverse collection of
type vpiTrvsCollection.
p_vpi_time time_p: Pointer to a structure containing the returned time information. There are
several cases to consider:
PLI_INT32 type = ...; /* vpiScaledRealTime, vpiSimTime, or vpiSuppressTime */
(time_p == type): Get the time of traverse object or collection. In case of collection
return time only if all the members have the same time, otherwise time_p is not modified.
(time_p == vpiMinTime & type): Gets the minimum time of traverse object or
collection.
(time_p == vpiMaxTime & type): Gets the maximum time of traverse object or
collection.
(time_p == vpiNextVC & type): Gets the time where traverse handle points next.
Returns failure if traverse object or collection has no next VC and time_p is not modified. In
the case of a collection, it returns success when any traverse object in the collection has a next
VC, time_p is updated with the smallest next VC time.
(time_p == vpiPrevVC & type): Gets the time where traverse handle previously
points. Returns failure if traverse object or collection has no previous VC and time_p is not
modified. In the case of a collection, it returns success when any traverse object in the
collection has a previous VC, time_p is updated with the largest previous VC time.
Related routines: None.

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

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

发布评论

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