返回介绍

E.11.3 Access functions

发布于 2020-09-09 22:56:15 字数 1462 浏览 1054 评论 0 收藏 0

Similarly to sized arrays, there are functions for copying data between the simulator representation and the canonical representation and to obtain the actual address of SystemVerilog data object or of an individual element of an unpacked array. This information might be useful for simulator-specific tuning of the application. Depending on the type of an element of an unpacked array, different access methods shall be used when working with elements.

  • Packed arrays ( bit or logic) are accessed via copying to or from the canonical representation.
  • Scalars (1-bit value of type bit or logic) are accessed (read or written) directly.
  • Other types of VALUES (NULL, structures) are accessed via generic pointers; a library function calculates an address and the user needs to provide the appropriate casting.
  • Scalars and packed arrays are accessible via pointers only if the implementation supports this functionality (per array), e.g., one array can be represented in a form that allows such access, while another array might use a compacted representation which renders this functionality unfeasible (both occurring within the same simulator).
SystemVerilog allows arbitrary dimensions and, hence, an arbitrary number of indices. To facilitate this, variable argument list functions shall be used. For the sake of performance, specialized versions of all indexing functions are provided for 1, 2, or 3 indices.

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

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

发布评论

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