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