Altera_Forum
Honored Contributor
13 years agoTime delay simulation
Hi,
My question might be too newbie. But (trust me) I have searched for the solution of this problem in Google and this forum but found to answer. I have Quartus II 9.1 and would like to simulate this Verilog code but still in vain: module MyClock(clk); output clk; reg clk; `timescale 10ms/1ms initial clk = 0; always begin # 1 clk = ~clk; end endmodule Quartus II 9.1 just gives X-es (undefined / don't care) in the simulation report. The code is supposed to produce a clock signal with 20ms period. This code (or similar) is available in many sites so I assumed it is correct. Bottom line is I have trouble to simulate anything to do with time delays indicated by "#" and timescale directive.