Forum Discussion

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

MAXV - User Flash Memory

Hello,

I would have one question related to user Flash Memory programming (UFM) on MAXV.

In the data sheet, there is written: "The targeted location in the UFM block that will be written must be in the

erased state (FFFFH) before initiating a WRITE operation" and "When the UFM sector is erased, it has 16-bit locations all filled with FFFF".

If I want to write a data at adress# 10 of sector 0, this location# 10 needs to be 0xFFFF to be able to write a new data. I checked this, it works.

Correct me now if I am wrong now: If I want to rewrite a new data at this same address# 10, I need first to save all data's of sector 0, erase sector 0 with command 0x20 (all sector 0 will be then 0xFFFF) and then, rewrite all sector 0 data's, including the data that I wanted to write initially. Am I right?

Thank you in advance for your comments.

Fabe

9 Replies

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

    Hello,

    I have a related question; how to use UFM for device configuration.

    I am just gathering information regarding this and as per AN-631, UFM allows this, saving board space & design cost.

    My questions are..

    1) How could I program the UFM with the POF file. Or do I need the SOF file?

    2) What utility in Quartus II allows this. The 'Programmer' utility?

    3) Do I need to use any of the ALTUFM mega-functions? It seems they are meant to use the UFM as an I2C, SPI devices but not to store the configuration bit file.

    Help is appreciated. Thanks
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Also..for this work, I am not planning to use USB (Blaster) cable... (no USB port on board). Would JTAG pins, available on device IOs suffice?

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

    Hi synchronous,

    Here are my comments for MAXV CPLD:

    1) In Quartus software, i defined a ALTUFM_SPI block (could be some other UFM options). Then, I defined a Memory Initialization File by going to File => New => Memory Files. You can define the values you want to have on your UFM. Then, you have to setup the ALTUFM_SPI parameters: ACCESS_MODE: READ or READ_WRITE, LPM_FILE => you just put the name of the MIF file created (for example like this: "test.mif"). Then, you have to recompile the project after correct inputs/output definition of ALTUFM_SPI block. A pof file is created and you just have to download it to your MAXV using the dedicated programming JTAG port.

    2) Programmer utility allows you to download the pof file to the CPLD via JTAG.

    3) Please, check answer 1)

    4) Just read AN-100. In-System Programmability Guidelines => Yes, use JTAG to program MAXV.

    Hope this helps.

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

    Hi Fabe,

    Thanks for the reply.

    I don't think POF file allow CPLD to retain configuration, once there is no power.

    Typically SOF file, which is written to a flash device (on board EEPROM) retains the device configuration in case of power disruption.

    As per AN-631 "you can use the ufm block to replace on-board flash and eeprom memory devices to store assp or processor configuration bits"

    I don't think your ans 1) provides this solution.

    Did you permanently configure your Max V, using UFM? If so, then please mention the key steps.

    Thanks again,
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    synchronous,

    MAXV UFM is a flash memory. So, it can retain what you what to store on it during no power. One difference is the number of write cycles which is limitted to 100 for the industrial range and 1000 write cycles for the commercial range. This is the only limiting factor.

    So, use the MAXV UFM to store configuration parameters that you do not think to update so often.

    Hope this helps.

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

    Hi Fabe,

    I think I found my answer..

    As per Max V Handbook..

    "the flash memory block is located on the bottom-left area of the device. The majority of this flash memory storage is partitioned as the dedicated configuration flash memory (CFM) block. the cfm block provides the non-volatile storage for all of the sram configuration information. The CFM automatically downloads and configures the logic and I/O at power-up, providing instant-on operation."

    In the second attached pic it is seen that CFM is much bigger than the UFM.

    When I started my Programmer, I saw 'CFM and UFM'. (Coming from FPGA background, I never saw CFM/UFM options with the pof file in the programmer) I have feeling that I have to have CFM checked off, when programming the POF file and could leave UFM un-checked. When I first check-off the POF file, both CFM and UFM automatically get checked-off.

    In think this answers my question, that I only need to program the CFM, to save the configuration of my design and UFM only if I wanted an on-cpld user device.

    Though I still have to try this, as I don't have the HW with me yet.

    question:In your case you leave both of them checked off, since in your design you are using UFM too?

    PS: Attaching two snap-shots related to above.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi synchronous,

    Please, find below the attached picture of the configuration that I have in order to program MAXV.

    Hope this helps.

    Fabe