Forum Discussion
Altera_Forum
Honored Contributor
9 years agoThe nios software can be stored in different ways:
- in the same epcs device which contains the fpga configuration bitstream - in a different flash device (i.e. parallel flash) - encapsulated in the fpga configuration bitstream in the form of onchip memory initialization data. The first two options require a proper bootloader, while in the third one you could run nios software directly, since the code is already there where it is supposed to be. Storing nios software in flash adds complexitiy but it is a more flexible option if you plan to update the nios code frequently without need of changing the 'hardware', namely the fpga configuration. On the other hand, if you have a well defined nios application, the third option could be more convenient one. In general you want to avoid that your system gets stuck because the update process was interrupted, so the typical way to perform remote update is storing on epcs two copies of the fpga configuration (and possibly the nios program). You have a 'base' or 'factory' configuration and an 'application' configuration The base configuration is stored at epcs address 0 and it is never deleted or updated; it loads every time you power up the system, it reads the epcs device at a well known address and if it finds a valid application bitstream it triggers the fpga reconfiguration from that address. If no application is available, the base configuration still allows the minimal functionality required to store the application image into the epcs, for example receiving data from uart.