Forum Discussion
Altera_Forum
Honored Contributor
16 years agodelay
hello, i have a little question for you, guys....how can i put a delay between two if instructions (the second if to be executed after a few seconds)..........the code is in verilog. thx...
Altera_Forum
Honored Contributor
16 years ago --- Quote Start --- hello, i have a little question for you, guys....how can i put a delay between two if instructions (the second if to be executed after a few seconds)..........the code is in verilog. thx, tastax --- Quote End --- Use counter. // very simpy without reset. reg [7:0] cnt; always @ (posedge clk) begin cnt <= cnt + 1'b1; if(condition1 && (cnt == 7'h0))begin ..... end if(condition2 && (cnt == 7'h3))begin ..... end if(condition3 && (cnt == 7'h13))begin ..... end end