我正在学习 Verilog 中的循环,并想创建一个时间周期为 20ns 的简单时钟。每当我尝试在 EDA Playground 中运行代码时,都会出现以下错误。
module Pulse(clock);
output reg clock;
initial
begin
clock = 1'b0;
end
forever #10 clock = ~clock; //Error is here
endmodule
design.sv:9:语法错误 design.sv:9:错误:无效的模块项。