Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Non-volatile user configurations

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.

9 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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..
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

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

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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."