Forum Discussion

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

Preserving sectors in an EPCS

Hello,

I need to update the configuration device (EPCS4N) of a Cyclone II FPGA (EP2CF4848N). Sector number 7 was used to store information that is programmed during production. I would like to maintain the information stored in this sector, but saw that when I download the new configuration using a JIC file that the complete contents of the EPCS4 device is erased before the new configuration data is programmed.

Are there any tools available that will allow me to only update the lower sectors, or to read out the top sector and then program it again after the update?

Thanks,

Richard.

14 Replies

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

    Richard, have you had success with this? I am trying to achieve the same function currently. I store parameters to flash during production and want to update the configuration without overwriting these parameters. I too am not using the NIOS.

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

    Hi Raz,

    In this case, you need to use altasmi_parallel megafunction to write into the EPCS from your FPGA in user mode. The correct file format to be written into the EPCS is RPD file. You need to generate RPD file using QII conversion tool- Convert Programming File. However, the default RPD file also overwrite the whole EPCS memory with unused memory set to '1'. You only need the portion of the RPD file that consists the configuration data. Therefore, you need to use external binary tool to crop away the unused data and sustain the useful configuration data within the RPD, namely modified-RPD. With this, you only begin to write the rpd file into the EPCS at memory location 0x0.

    In fact, you also can sector protect the EPCS memory using the altasmi_parallel megafunction. See details in the User Guide.

    altasmi_parallel: http://www.altera.com/literature/ug/mfug_asmi.pdf

    Please make sure the relevant inputs into the altasmi_parallel block are correct and hopefully you can get it done well. Please try to write simple data into the EPCS and read it out to confirm the altasmi_parallel megafunction is working well now before you proceed to write the entire configuration data into the EPCS for reconfiguration purpose.

    I hope this help out pretty well.

    Regards,

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

    Yes I tested, after programming the new JIC file the sector that I am interested in is filled with 0xff.

    The problem with the Nios flash programmer is that I need a Nios core running on the FPGA. I do not have a valid Nios license to generate such a configuration, and also don't have any experience in using Nios.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Are you certain the JIC method overwrites the entire device? You can use the NIOS flash programmer which will only erase the space required for the new data.

    Jake