|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
- `timescale 1ns/10ps
- program test_dis(input [7:0] data);
- initial
- $display("@%0t, PROGRAM : data = %d", $time, data);
- endprogram
- module tb();
- reg [7:0] data;
- reg clk;
- initial
- begin
- #0 clk = 0;
- data = 0;
- #20 $stop;
- end
- always #5 clk = ~clk;
- always @ (negedge clk)
- begin
- data <= $random%128;
- $display("@%0t, DISPLAY : data = %d", $time, data);
- end
- test_dis u1(data);
- endmodule
复制代码
代码如上,利用NC编译,可以得到相应的结果:(PS:如何让仿真时间不在0时刻停止呢?为什么会隐形调用finish呢?)
但是利用VCS编译的时候,会有如下error:
|
|