Altera_Forum
Honored Contributor
8 years agoVerilog coding
Hi all,
I am just start to learn Verilog and immediately had a problem - please take a look at code - why "repeat (10) does not working? I was expected a 5 pulse train at every oop pulse - but in simulation the is no changes of pls output at all. I tried to use for and while condition - same result - no pulse train. /////////////////////////////////////////////////////////////////////////////////////////////////// module buff_gen (oop,pls); input oop; wire oop; output pls; reg pls; initial begin pls = 0; end always @ (posedge oop) begin repeat (10) begin # 5 pls = ~pls; end end endmodule //////////////////////////////////////// please tell me what I am doing wrong. thanks cicga