返回介绍

E.6.4 Basic types

发布于 2020-09-09 22:56:14 字数 1346 浏览 921 评论 0 收藏 0

Table E-1 defines the mapping between the basic SystemVerilog data types and the corresponding C types.

Table E-1: Mapping data types

?Encodings for bit and logic are given in file svdpi.h. Refer to Annex E.9.1.1.

The DPI interface also supports the SystemVerilog and C unsigned integer data types that correspond to the mappings Table E-1 shows for their signed equivalents.

Note that input mode arguments of type byte unsigned and shortint unsigned are not equivalent to bit[7:0] or bit[15:0], respectively, since the former are passed as C types unsigned char and unsigned short and the latter are passed as C unsigned int (i.e., svBitVec32). A similar lack of equivalence applies to passing such parameters by reference for output and inout modes.

The representation of SystemVerilog-specific data types like packed bit and logic arrays is implementation-dependent and generally transparent to the user. Nevertheless, for the sake of performance, applications can be tuned for a specific implementation and make use of the actual representation used by that implementation; such applications shall not be binary compatible, however.

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

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

发布评论

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