Forum Discussion
Altera_Forum
Honored Contributor
9 years ago --- Quote Start --- Yes, but it will not increase and remains zero permanently. Try this:
input reset;
reg counting;
reg r_reset_n;
always@(posedge clk or negedge reset)
begin
if(!reset)
begin
counting <= 11'd0;
r_reset_n <= 1'b0;
end
else
if (counting <= 11'd1234)// replace 11'd1234 with required reset delay, based on clock frequency, in order to remove glitches.
begin
counting <= counting + 1'b1;
r_reset_n <= 1'b0;
end
else
begin
counting <= 11'd2047;
r_reset_n <= 1'b1;
end
end
--- Quote End --- hello when there is a falling edge of reset signal,counting will equal to 0. but my question is Could "M1" pin will generate a falling edge when FPGA board power on?