Systemverilog DPI 中的实际参数和形式参数有什么区别?

发布于 2025-01-16 21:12:28 字数 135 浏览 1 评论 0原文

在 SystemVerilog 设计中,我使用带有 C 程序函数的 DPI-C。在对这两个文件运行模拟时,出现错误: “DPI 开放阵列不支持实际类型”。 我想知道在 DPI 的 SystemVerilog 方面哪个参数称为实际参数,哪个参数称为形式参数。

In SystemVerilog design I am using DPI-C with c program functions. While running simulation on both files, I am getting error:
"Actual type is not supported for DPI open array".
I want to know which argument is called actual and which is called formal in SystemVerilog side of DPI.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不可一世的女人 2025-01-23 21:12:28

从软件编程术语来看,任何例程的正式参数都是在定义例程时声明的参数。 实际参数是调用例程时传递给例程的表达式。例如,

import "DPI" function void master_write(int address,
                                        int data[]);

addressdata正式参数。

int addr;
int buffer[$];

always @(posedge clk) master_write(addr/2, buffer);

addr/2buffer 是传递给 master_write()实际参数。

另一个术语:“不支持”通常意味着您编写的内容是由 LRM 定义的,但您使用的工具尚未实现它。

From software programming terminology, the formal arguments to any routine are the ones declared when defining the routine. The actual arguments are the expressions you pass to the routine when calling it. For example

import "DPI" function void master_write(int address,
                                        int data[]);

address and data are the formal arguments.

int addr;
int buffer[$];

always @(posedge clk) master_write(addr/2, buffer);

addr/2 and buffer are the actual arguments passed to master_write().

Another piece of terminology: "not supported" usually means what you wrote is defined by the LRM, but the tool you are using has not implemented it yet.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文