0
我正在使用以下代码。迭代次数限制达到10000
`timescale 1ns/1ps
module program_counter
(
input clock,
input reset,
input [31:0] in,
output reg [31:0] out
);
initial
begin
out <= 32'b00000000000000000000000000000001;
end
always @(negedge clock)
begin
if(reset)
begin
out <= 32'b00000000000000000000000000000001;
end
else
begin
out <= in;
end
end
endmodule
它显示错误,如图
"ERROR: at 0 ps: Iteration limit 10000 is reached. Possible zero delay oscillation detected where simulation can not advance in time because signals can not resolve to a stable value in File "C:/dewesh/latest_bkup/Program_counter.v" Line 12. Please correct this code in order to advance past the current simulation time."
我无法找到是什么问题。
'32'b00000000000000000000000000000001;'与'32'b1相同;' – Morgan
32'h ****对您而言较短。如果你想要变化,把它分配为1,32位适合int。 – Khanh