返回介绍

23.18 System task arguments for multi-dimensional unpacked arrays

发布于 2020-09-09 22:55:57 字数 1368 浏览 1104 评论 0 收藏 0

The $readmemb, $readmemh, $writememb, and $writememh signatures are shown below:

$readmemb("file_name", memory_name[, start_addr[, finish_addr]]);
$readmemh("file_name", memory_name[, start_addr[, finish_addr]]);
$writememb("file_name", memory_name[, start_addr[, finish_addr]]);
$writememh("file_name", memory_name[, start_addr[, finish_addr]]);

memory_name can be an unpacked array, or a partially indexed multi-dimensional unpacked array that resolves to a lesser-dimensioned unpacked array.

Higher order dimensions must be specified with an index, rather than a complete or partial dimension range. The lowest dimension (i.e. the right-most specified dimension in the identifier) can be specified with slice syntax. See Section 4.4 for details on legal array indexing in SystemVerilog.

The start_addr and finish_addr arguments apply to the addresses of the unpacked array selected by memory_name. This address range represents the highest dimension of data in the file_name.

When slice syntax is used in the memory_name argument, any start_addr and finish_addr arguments must fall within the bounds of the slice’s range.

The direction of the highest dimension’s file entries is given by the relative magnitudes of start_addr and finish_addr, as is the case in 1364-2001.

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

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

发布评论

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