Forum Discussion

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

Programing CFI Flash

Hello,

I want to run a NIOs processor on a Cyclone III with code stored in a CFI flash.

The FPGA is programed via an EPCS controller.

How do i program the code on to the CFI flash? Do i need a configuration device like the development kit uses.

Or does the NIOS processor know how to write to flash using the flash programer?

Thanks Matt

7 Replies

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

    If it's a CFI flash, the nios2-flash-programmer can be used to program it.

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

    Thanks for the response.

    Do i need any glue logic? For example the development boards have an MAX device used for programing.

    Or do i just connect the CFI flash to the NIOS proc?

    Thanks.

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

    The MAX device on the dev. boards is to provide a method for programming the FPGA using data stored in the CFI compatible flash. As far as your FPGA code is concerned, it's not even there. The CPLD should relinquish control of the flash data bus once programming of the FPGA is complete.

    In your SOPC system, all you need is an Avalon Memory-Mapped Tri-state bridge and a CFI flash controller.

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

    The glue logic is needed with FPGAs not directly supporting AP (Active Parallel) configuration scheme. Cyclone III in contrast can read it's configration directly from a CFI flash.

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

    Thanks for all of your help.

    I am actually going to use Active Parallel programing and store the FPGA configuration and the nios code on the same flash.

    I assume i program the flash the same using the flash-programmer?

    Thank You

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

    Hi,

    I plan a NIOS-based system, that will use the remote update feature, to receive a new configuration file from an external card. I'm using a Cyclone III FPGA that will burn a P33 Flash in AP mode. I understand I need an application to run on the NIOS-based system (right?), but I need to adapt it to communicate with the externall card through a local bus, and by an alraedy made protocol. In this protocol I receive a block of bytes and burn them to the Flash. Afterwards I release the flag, to the extrenal card, receive another block of bytes etc.

    Do you have the source files for this application? Did someone write such an application to communicate in the above prtocol with the external card?

    I'll be gratefull if you could send me those source files.

    Best Regards,

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

    --- Quote Start ---

    Thanks for all of your help.

    I am actually going to use Active Parallel programing and store the FPGA configuration and the nios code on the same flash.

    I assume i program the flash the same using the flash-programmer?

    Thank You

    Matt

    --- Quote End ---

    ----------------------------------------------------------------------------------------------

    Hi Matt,

    How do I program FPGA configuration and nios code on the same CPI flash?If do so,epcs flash memory still needed? Any guidance for me?Thanks.