返回介绍

31.10 Variables (supersedes IEEE 1364-2001 section 26.6.8)

发布于 2020-09-09 22:56:04 字数 3538 浏览 1073 评论 0 收藏 0

NOTES

1) A var select is a word selected from a variable array.

2) The boolean property vpiArray shall be TRUE if the variable handle references an array of variables, and FALSE otherwise. If the variable is an array, iterate on vpiVarSelect to obtain handles to each variable in the array.

3) To obtain the members of a union and structure, see the relations in Section 31.21

4) The range relation is valid only when vpiArray is true. When applied to array vars this relation returns only unpacked ranges. When applied to logic and bit variables, it returns only the packed ranges.

5) vpi_handle (vpiIndex, var_select_handle) shall return the index of a var select in a 1-dimensional array. vpi_iterate (vpiIndex, var_select_handle) shall return the set of indices for a var select in a multidimensional array, starting with the index for the var select and working outward

6) vpiLeftRange and vpiRightRange shall only apply if vpiMultiArray is not true, i.e. if the array is not multi-dimensional.

7) A variable handle of type vpiArrayVar represents an unpacked array. The range iterator for array vars returns only the unpacked ranges for the array.

8) If the variable has an initialization expression, the expression can be obtained from vpi_handle(vpiExpr, ar_handle)

9) vpiSize for a variable array shall return the number of variables in the array. For non-array variables, it shall return the size of the variable in bits. For unpacked structures and unions the size returned indicates the number of fields in the structure or union.

10) vpiSize for a var select shall return the number of bits in the var select. This applies only for packed var select.

11) Variables whose boolean property vpiArray is TRUE do not have a value property.

12) vpiBit iterator applies only for logic, bit, packed struct, and packed union variables.

13) vpi_handle(vpiIndex, var_bit_handle) shall return the bit index for the variable bit. vpi_iterate(vpiIndex, var_bit_handle) shall return the set of indices for a multidimensional variable bit select, starting with the index for the bit and working outwards

14) cbSizeChange will be applicable only for dynamic and associative arrays. If both value and size change, the size change callback will be invoked first. This callback fires after size change occurs and before any value changes for that variable. The value in the callback is new size of the array.

15) The property vpiRandType, returns the current randomization type for the variable, which can be one of vpiRand, vpiRandC, and vpiNotRand.

16) vpiIsRandomized is a property to determine whether a random variable is currently active for randomization.

17) When the vpiMember property is true, it indicates that the variable is a member of a parent struct or union variable. See also relations in Section 31.21

18) If a variable is an element of an array, the vpiIndex iterator will return the indexing expressions that select that specific variable out of the array.

19) Note that:

logic var == reg

var bit var == reg bit

array var == reg array

20) The properties vpiScalar and vpiVector are applicable only to packed struct vars, packed union vars, bit vars and logic vars. These properties return false for all other objects.

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

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

发布评论

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