Forum Discussion

fa_fpga_enthusiast's avatar
fa_fpga_enthusiast
Icon for Occasional Contributor rankOccasional Contributor
2 years ago

Exploring why GSFI IP Core repeats sending command and address for each 4-byte data in Page Program

Dear Intel Support Team,

We're working on two projects to communicate with Micron Flash Memory. The first one called the SPI project, uses the SPI 4-wire IP core and SPI driver. In the second project, known as the GSFI project, we're using the Generic Serial Flash Interface IP Core with the GSFI HAL driver. The protocol used in the GSFI project is Standard SPI.

In the SPI project, when we use the alt_avalon_spi_command() function to write a page of Flash memory, everything goes smoothly. The Chip-Select signal goes low, then we send the Page Program command, address, and data. Each byte of data is sent to the flash memory one at a time.

But in the GSFI project, when we use the intel_gsfi_write_block() function to write a page in the Flash memory, things are a bit different. For every 4-byte data segment, the GSFI core first sends a Write Enable command. Then it sends the Page Program command, address, and the 4-byte data. After that, it checks the Status Register. This process repeats for each 4-byte segment, creating a lot of overhead.

We're looking for help in understanding why the GSFI core behaves differently compared to the simpler SPI method used in the SPI project. In fact, we are wondering why GSFI IP Core sends the Page Program command and address for each 4-byte data, instead of sending data as a burst, as explained above.

Note: We're using Intel Quartus Prime Pro Edition on Agilex 7 SoC.

18 Replies

  • aikeu's avatar
    aikeu
    Icon for Regular Contributor rankRegular Contributor

    Hi fa_fpga_enthusiast,


    I think you are referring to the "SPI(4 Wire Serial) Intel FPGA IP" in the IP catalog.


    Thanks.

    Regards,

    Aik Eu


  • fa_fpga_enthusiast's avatar
    fa_fpga_enthusiast
    Icon for Occasional Contributor rankOccasional Contributor

    Hi Aik Eu,

    Thanks for the reply!

    To sum up, the GSFI IP Core lacks burst support for page programming (not just for page programming, but for both reading and writing).

    You recommended using the Generic Quad SPI Controller II Core, but we couldn't find this IP core in the IP catalog or Platform Designer of Quartus Prime Pro version 23.4.0. Additionally, the SPI (4 Wire Serial) Intel FPGA IP Core only supports SPI mode, not Quad mode.

    Thanks.

  • FvM's avatar
    FvM
    Icon for Super Contributor rankSuper Contributor

    I just reviewed the discussion and find it partly confusing and the reported result inconsistent.

    Above, you are discussing a problem that the HAL layer is apparently unable to generate burst write access to GSFI IP, burst count always 1. Later Intel is quoting a four years old discussion stating that GSFI doesn't support page write. Reading GSFI reference about burst mode, I won't expect that the information still applies to recent GSFI IP versions, but it can be.

    Did you try to verify in low level test if burst write is working approprately (translated to page write) or not?

  • aikeu's avatar
    aikeu
    Icon for Regular Contributor rankRegular Contributor

    Hi fa_fpga_enthusiast,

    Sorry that I mistaken the device which you used. The Generic Quad SPI Controller II Core is not available for Agilex 7 after I check with the IP catalog in quartus but only SPI 4-wire IP which you have used in your SPI project that you have no issue working with.

    Thanks.

    Regards,

    Aik Eu

  • fa_fpga_enthusiast's avatar
    fa_fpga_enthusiast
    Icon for Occasional Contributor rankOccasional Contributor

    Hello,

    We incorporate the GSFI IP Core using the platform designer, and in our embedded software, we're utilizing the intel_gsfi_write_block() function from the HAL driver. Simulation results validate the claim specified in the following URL: [https://community.intel.com/t5/FPGA-Intellectual-Property/Generic-Serial-Flash-Interface-Intel-FPGA-IP-Page-program-burst/td-p/1205777].

    We haven't conducted low-level verification for the burst count as it's not part of our current plan.

    Thanks.

  • aikeu's avatar
    aikeu
    Icon for Regular Contributor rankRegular Contributor

    Hi fa_fpga_enthusiast,


    Thanks for the feedback I’m glad that your question has been addressed, I now transition this thread to community support. If you have a new question, Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.


    Thanks.

    Regards,

    Aik Eu