0
\$\begingroup\$

This question already has an answer here:

I have a Max10 dev board with a 10m08 chip on it. I made a simple counter to blink the LED's. My counters have asynchronous resets, and my asynchronous reset has a circuit to keep it low for two clock cycles and prevent metastablity. I reset the fpga and it the counters stop (they all go to zero), it only starts counting when I upload a new flash to the dev board. If I power down the FPGA and power it back up I get the same result. This leads me to believe that its not my reset and its more of a flashing problem. Is there some kind of setting to make the flash stick? or should I go back to debugging. How do you make the flash persistent, I don't see an option for that in the programmer, do you have to configure the user flash?

\$\endgroup\$

marked as duplicate by Connor Wolf, PeterJ, Daniel Grillo, nidhin, Dave Tweed Mar 3 '16 at 19:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • \$\begingroup\$ Upload the .pof file to get the configuration to be persistent. I had tried this previously but it was after I had uploaded a .sof file, you may have to load it when the programmer screen is first opened. \$\endgroup\$ – Voltage Spike Jan 28 '16 at 16:25
  • \$\begingroup\$ The .pof is in the output directory and has a slightly different way of programming \$\endgroup\$ – Voltage Spike Mar 2 '16 at 18:15
  • \$\begingroup\$ This is different from a cyclone II in the way the user configuration data is stored \$\endgroup\$ – Voltage Spike Mar 3 '16 at 6:40
1
\$\begingroup\$

I answered a question here that details some of the different types of FPGA file formats: FPGA: Bitstream vs. SRAM Object File

Basically, right now, you're flashing just the SRAM with the SOF (SRAM Object File) -- this is volatile, and will be lost at power down or reset. SRAM FPGAs generally load their configuration from a configuration memory on-board, or a microprocessor that configures it (via ISP or similar).

In your case, your MAX10 dev board has a built-in USB Blaster device that should be able to program the on-board configuration memory. See page 4-4 of the user-guide and how to generate and program a POF instead of a SOF. This will keep your configuration on the flash memory device, and it will get loaded at every power-on.

I believe the Quartus II programmer can download a small executive to the FPGA (via JTAG) that then provides access to the SPI memory. It then uses that temporary executive to flash the SPI memory, and then resets.

\$\endgroup\$
1
\$\begingroup\$

The FPGA does not have internal flash memory, just SRAM. Instead, it loads the configuration from an external flash chip after reset.

Typical Altera developer boards have two programming headers, one connected to the FPGA's JTAG connections, and the other connected to the flash. If you want to write a persistent configuration, you need to connect to the latter, while for debugging, it is better to use the former as there will be no wear on the flash.

\$\endgroup\$
  • \$\begingroup\$ So how do I get the configuration to be persistent? I've looked on the programmer screen and I don't see any options. \$\endgroup\$ – Voltage Spike Jan 26 '16 at 22:47
  • \$\begingroup\$ Actually, MAX 10 family chips has internal configuration flash memory, there's no need in external configuration devices, and configuration will be reloaded in CRAM when MAX 10 chip powers on. \$\endgroup\$ – Vlad Oct 26 '17 at 8:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.