13 · Keep a design after power-off
Every other example loads a .sof: it runs until the power goes off. The MAX 10 also has its own
configuration flash: write a design there and the board starts it by itself at every power-up.
Flashed and verified on the board 2026-10-24
Power-cycle check: to do by hand
Skill: flash-design
.sof or .pof
| .sof (SRAM Object File) | .pof (Programmer Object File) | |
|---|---|---|
| Goes into | the FPGA's configuration memory (SRAM) | the MAX 10's internal flash (CFM, plus UFM) |
| Lasts | until power-off | until something else is flashed; loads itself at every power-up |
| Takes | about 2 s | about 15 s (write + verify) |
| Use for | every build while developing | the finished design: a demo, a product, a classroom board |
Every build in this BKM already makes both: output_files/<name>.sof and <name>.pof
(the projects use INTERNAL_FLASH_UPDATE_MODE "SINGLE IMAGE WITH ERAM", so ROM and RAM contents are in the flash
image too).
Do it
python scripts/de10.py flash examples/04_gamepad # writes and verifies the flash
→ Info: Quartus Prime Programmer was successful. 0 errors, 0 warnings
→ OK: flashed and verified; it starts at the next power-up
Under the hood: quartus_pgm -m jtag -o "pv;output_files/gamepad.pof" (p = program, v = verify). Or in the
Quartus Programmer: add the .pof, tick Program/Configure and Verify on the CFM and UFM rows, Start.
Measured on the board
- The game-pad tester (example 04) was flashed and verified without errors.
- Right after programming, the MAX 10 reloaded itself from the new flash image: the board answered over USB with example 04's status line, its frame counter showing it had just started.
- Still to do by hand: unplug the USB cable, plug it back, and see the game-pad screen come up without the PC doing anything. (This replaces whatever the board started with before; the original streaks demo is gone.)
Good to know
- Loading a
.sofafterwards does not touch the flash: develop as usual, and the flashed design comes back at the next power-up. - The MAX 10 can also hold two images and choose at power-up (the dual-image mode, selected by the CONFIG_SEL pin, or switched from your design with the Dual Configuration IP). Not built here.
- The UFM (user flash memory) part of the flash can hold your own data that survives power-off, through the On-Chip Flash IP. Not built here.