Verilog RTL code bug for 1-bit counter

In reply to Harish_G:

Thanks for correct and most of the typos, but there are still a few left. : → ;, l’bl → 1’b1, - → ~.

Your problem is simply you did not run the simulation long enough. You have repeat(5) and you need at least repeat(10) to see q toggle.