Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16612 Discussions

Non-volatile user configurations

Altera_Forum
Honored Contributor II
2,105 Views

Hi, 

 

Is it possible to boot user designs that do not contain a nios2 core from the flash memory? E.g. a DSPBuilder bitstream? I've had a look through the "Nios II Flash Programmer User Guide" but that seems to imply that a design with SOPC system/nios2 core is needed... 

 

Although I am somewhat new to the Altera tools, I have a lot of experience with the Xilinx ones. With those (Impact), it is possible to store arbitrary bitstreams into the flash boot memory... 

 

Thanks.
0 Kudos
9 Replies
Altera_Forum
Honored Contributor II
529 Views

It seems that the automatically generated *.pof file can be used to write the bitstream to the EPC16 flash device? Unfortunately, the JTAG boundary scan fails to find such a device on my Stratix II EP2S60 DSP Development Board.. 

 

Quartus II programmer only locates the EPM3256A device on the CONF JTAG port and the EP2S60 on the JTAG Stratix II port.. 

 

Any suggestions?
0 Kudos
Altera_Forum
Honored Contributor II
529 Views

yes, you can program a system that does not include a Nios II into flash 

 

with the Nios II Flash Programmer, you need to have the FPGA configured with design which includes a Nios II and a flash component in order to write out to the flash, but the configuration you write out to flash doesn't have to include a Nios II 

 

you could also take a look at the Parallel Flash Loader (PFL): 

 

http://www.altera.com/literature/ug/ug_pfl.pdf
0 Kudos
Altera_Forum
Honored Contributor II
529 Views

Thanks for the information but the PFL does not seem to be supported by the MAX3000A device that is present on the board. 

 

I'll try out the nios2 based solution again. I guess I could use one the example designs from the 'altera9.1/nios2eds/examples' directory?
0 Kudos
Altera_Forum
Honored Contributor II
529 Views

I've created a simple SOPC flash programmer (attachment# 1) but the nios2 Flash Programmer GUI fails as shown in attachment# 2. 

 

Do I need to initialise the flash memory somehow?
0 Kudos
Altera_Forum
Honored Contributor II
529 Views

Apologies, the error was due to an erroneously connected flash_rw pin. I've now managed to write the bitstream into the flash memory using the Nios II Flash Programmer. 

 

However, on power up, the configuration fails to load. The 'USER' configuration LED turns on for a while but then it turns off and the 'FACTORY' and 'ERROR' LEDs come on. I've changed configuration switch to the combinations described in the handbook to no avail... 

 

Thanks in advance for any suggestions..
0 Kudos
Altera_Forum
Honored Contributor II
529 Views

which development kit are you using? you should try sof2flash (with the --pfl --optionbit and --programmingmode flags if the kit is using PFL)

0 Kudos
Altera_Forum
Honored Contributor II
529 Views

Hi thepancake, 

 

thanks for helping me with this. The kit I have is the "dsp development kit, stratix ii edition (http://www.altera.com/products/devkits/altera/kit-dsp-2s60.html)". I've tried the --pfl option without success and I could not find the --programmingmode option in the nios II flash programmer handbook. 

 

The settings I have are: 

 

sof2flash --input="/tmp/flash_programmer/sinusoid_dspbuilder/sinusoid.sof" --output="/tmp/flash_programmer/flash/sinusoid_cfi_flash.flash" --offset=0x0 --verbose --pfl  

 

and  

 

nios2-flash-programmer "/tmp/flash_programmer/flash/sinusoid_cfi_flash.flash" --base=0x1000000 --sidp=0x2021008 --id=0x449B04A1 --timestamp=1284050797 --device=1 --instance=0 '--cable=USB-Blaster [USB 5-1.2]' --erase-all --go --program --verbose  

 

The "Nios II Flash Programmer" reports a successful flash but when I reboot the machine with the configuration switches set to "1110", It appears as if the board is trying to load the user design ("USER" and "FLASH_CEn" LEDs are on, "LOADING" flashing), fails and then falls back to the factory design ("FACTORY" and "FLASH_CEn" LEDs are on, "LOADING" flashing) which also fails to load ("FACTORY" and "ERROR" LEDs are on). 

 

According to the kit handbook, the configuration controller is an Altera EPM7256 PLD and "the flash memory, Stratix II device, and configuration controller are connected so that data from the flash configures the Stratix II device in fast passive-parallel mode."
0 Kudos
Altera_Forum
Honored Contributor II
529 Views

Sorted it out. Finally came across the "dsp development kit,stratix ii edition errata sheet (http://www.altera.com/literature/ds/es_strii_dsp_dev_kit-v1-1-0.pdf)" which had much better instructions than the original handbook. Essentially, I needed the proper flash offset which is "0x00500000" rather than the default "0x0". 

 

Thanks again for all your help!
0 Kudos
Altera_Forum
Honored Contributor II
529 Views

thanks for sharing the solution

0 Kudos
Reply