WeHack BBS
试一下用iverilog跑SystemVerilog - 可打印的版本

+- WeHack BBS (https://bbs.wehack.space)
+-- 版块: 其他讨论 (https://bbs.wehack.space/forum-10.html)
+--- 版块: 自由讨论区 (https://bbs.wehack.space/forum-13.html)
+--- 主题: 试一下用iverilog跑SystemVerilog (/thread-192.html)



试一下用iverilog跑SystemVerilog - vimacs - 11-06-2020

PHP 代码:
module top;

task mytask1(input [31:0x);
  $display("hello %h"x);
endtask

initial begin
  reg 
[31:0$random();
  reg [31:0$random();
  mytask1(u);
  mytask1(v);
end

endmodule 

命令 iverilog -g2012 tb.sv 生成 a.out,然后运行它就能输出 hello 了。