iverilog是否实现了邮箱(mailboxes)这一特性?
编译这段代码:
module mbox_tb();
// Create a new mailbox that can hold utmost 2 items
mailbox mbx = new(2);
// Block1: This block keeps putting items into the mailbox
// The rate of items being put into the mailbox is 1 every ns
initial begin
for (int i=0; i < 5; i++) begin
#1 mbx.put (i);
$display ("[%0t] Thread0: Put item #%0d, size=%0d", $time, i, mbx.num());
end
end
// Block2: This block keeps getting items from the mailbox
// The rate of items received from the mailbox is 2 every ns
initial begin
forever begin
int idx;
#2 mbx.get (idx);
$display ("[%0t] Thread1: Got item #%0d, size=%0d", $time, idx, mbx.num());
end
end
endmodule : mbox_tb
并使用以下命令行:
iverilog -g2012 -I../../verilib -I./src -DUSE_INCLUDE=1 -o mbox_tb.o tb/mbox_tb.sv
得到如下结果:
tb/mbox_tb.sv:4: syntax error
tb/mbox_tb.sv:4: error: Invalid module instantiation
tb/mbox_tb.sv:5: error: Invalid module instantiation
make: *** [mbox_tb.o] Error 3
这段代码直接来自 ChipVerify 的一个示例。iverilog 是否没有实现SystemVerilog的邮箱?
解决方案
没有实现,并且据此问题的描述,也没有计划支持它:
站内所有文章版权归属LeftHeroAI导航站,无授权禁止任何主体转载、抄袭、复制内容,亦不得私自架设镜像站点。一经侵权,本站将通过法律途径追责。