仿真激励报错求助
时间:10-02
整理:3721RD
点击:
module randomgenerator_test_v;
// Inputs
reg clk;
reg nrst;
// Outputs
wire [3:0] random;
// Instantiate the Unit Under Test (UUT)
randomgenerator uut (
.clk(clk),
.nrst(nrst),
.random(random)
);
initial begin
// Initialize Inputs
clk = 0;
nrst = 0;
// Wait 100 ns for global reset to finish
#100;
always #20 clk=!clk;
// Add stimulus here
#10 nrst=1;
#20 nrst=0;
#20 nrst=1;
end
endmodule
就上面红字体的显示错误,到底是什么问题?我用的是ISE的仿真器
有知道的指教一下!
// Inputs
reg clk;
reg nrst;
// Outputs
wire [3:0] random;
// Instantiate the Unit Under Test (UUT)
randomgenerator uut (
.clk(clk),
.nrst(nrst),
.random(random)
);
initial begin
// Initialize Inputs
clk = 0;
nrst = 0;
// Wait 100 ns for global reset to finish
#100;
always #20 clk=!clk;
// Add stimulus here
#10 nrst=1;
#20 nrst=0;
#20 nrst=1;
end
endmodule
就上面红字体的显示错误,到底是什么问题?我用的是ISE的仿真器
有知道的指教一下!
那句好像应该拿到initial beginning end 之外吧
2楼威武,正解
诚如2楼所说,修改后就好了,3Q
本人刚开始学,让各位大侠见笑了。
修改如此就可以了,你是用于产生始终信号吧?
always #20 clk=~clk;
试一下
initial和always块属于并列关系。一个执行一次,另一个循环多次。
always块另外起
不要写到initial begin end 块里面去
