1
\$\begingroup\$

What would be the easiest way to create a reset signal after new configuration has been downloaded to an FPGA?

I've always done a reset manually via a switch .. but there has to be a better way - perhaps there is a pin that informs that a download/soft reset has been performed that I could feed into an external timer? Or is there a way to do it from within Verilog maybe using an internal pin signal on the FPGA itself?

I'm using Cyclone IV FPGA.

asked Dec 29, 2024 at 19:32
\$\endgroup\$

2 Answers 2

3
\$\begingroup\$

You can generate a simple power on reset signal in the FPGA logic.

The Cyclone IV is capable of initialising a register on entry to user mode, so you can have a signal that is asserted high immediately after configuration completes.

Combined with an active clock to deassert the signal you can generate a simple reset signal in the FPGA

reg [3:0] resetGen;
initial begin
 resetGen <= 4'hF;
end
always @ (posedge clk) begin
 resetGen <= {resetGen[2:0], 1'b0};
end
wire reset;
assign reset = resetGen[3];

If you don't have an active clock available, the Cyclone IV includes an internal oscillator which can be used to provide a 40-80MHz clock signal (not very accurate but will do for this) which is used for configuration so is available immediately on entering user mode.

answered Dec 29, 2024 at 19:40
\$\endgroup\$
3
  • \$\begingroup\$ I thought the "initial" keyword was only for testing rather than synthesis? \$\endgroup\$ Commented Dec 30, 2024 at 3:24
  • \$\begingroup\$ Well - that certainly worked for me so I'll accept your answer as a solution. \$\endgroup\$ Commented Dec 30, 2024 at 6:05
  • 1
    \$\begingroup\$ @SparkyNZ initial used to set default values is synthesisble by many FPGA vendors tools. You can also alternatively do reg [3:0] resetGen = 4'hF;. \$\endgroup\$ Commented Dec 30, 2024 at 8:37
2
\$\begingroup\$

Read about the CONF_DONE pin in the FPGA datasheet. This pin outputs the state of the FPGA configuration and can be used as reset source.

answered Dec 29, 2024 at 20:31
\$\endgroup\$
1
  • \$\begingroup\$ Thank you - that was what I was originally looking for but much to my surprise the "initial" keyword seemed to work as well. \$\endgroup\$ Commented Dec 30, 2024 at 6:06

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.