Forum Discussion
Altera_Forum
Honored Contributor
9 years ago --- Quote Start --- This works too, I've used it for a long time with Altera Cyclone FPGAs. This code assumes CLOCK_50 is running at 50MHz.
// PowerUP Reset Logic
// generate a 500ms reset pulse on initial powerup
reg pup_count = 25'd0;
reg pup_reset = 1'b1;
always @(posedge CLOCK_50)
begin
pup_count <=# TPD pup_count + 1'd1;
if (pup_count == 25'd25000000) pup_reset <=# TPD 1'b0;
end
wire reset = pup_reset;
--- Quote End --- how exactly does this work? after pup_count saturates won't it wrap around to 25'd0 and then start incrementing again?