Author Topic: FPGA recommendation - Big QSPI flash memory solution  (Read 5508 times)

0 Members and 1 Guest are viewing this topic.

Offline aturcituTopic starter

  • Newbie
  • Posts: 6
  • Country: es
FPGA recommendation - Big QSPI flash memory solution
« on: September 12, 2016, 03:16:29 pm »
Hello all,

After enjoying the EEVBLOG youtube channel the forum for a while, today it is time for me to ask for your help!

Firstly, I would like to clarify that I have some experience working with VHDL and FPGA in general, I have worked or help on some project. However I have never designed a custom board myself. Right know I am working on a project which needs some especial features to be fullfiled and I am confused in some aspects.

What I need: Drive a small WVGA resolution OLED and load bitmaps images pre-stored in a memory at smt around 30 FPS. Therefore the system memory needs to be quite big, I was thinking of an 256 or 512 MB flash memory. The final constraint is that it needs to be as small as possible.

Threfore I was thinking to use a QSPI memory (for instance the S25FL512S) in order to ensure high reading speeds and small factor size. After that, I have been tryiing to find similar projects where similar flash memories where used.  After all this redading I am quite confused,  I am not sure how easy will be to find or create an QSPI interface. Moreover I have found that not all the FPGA are compatible with big flash memories (in order to store the bitstreem there) where some are limited to 16MB.

Also, in my first prototype I was thinking of using an Spartan6 or iCE40HX4K. Finally I donnot want to use any kernel or advance IC. I would like to stick to VHDL code and just use the FPGA as the LCD interface since in the board will be already another uC in charge of the communications 'to the external world'

Would be better to use two different memories for the project? Do you have any other advise regarding choosing the best FPGA?

Thank you in advance, and I hope that you can help me find my way on this project.

Cheers
« Last Edit: September 12, 2016, 09:45:15 pm by aturcitu »
 

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1811
  • Country: us
Re: FPGA help - Big QSPI flash memory solution
« Reply #1 on: September 12, 2016, 04:13:27 pm »
Is QSPI a requirement? If not, then consider parallel memory rather than serial. Lack of I/O pins is not generally a problem with FPGAs and you'll get higher performance. You'll need to analyze the data rate to the OLED to know what your performance requirements will be and whether you can get away with using a QSPI device.

Implementing QSPI is very easy to do in an FPGA. I've done it in less than 40 lines of Verilog, which probably translates to around 60 lines of VHDL.
"That's not even wrong" -- Wolfgang Pauli
 

Offline aturcituTopic starter

  • Newbie
  • Posts: 6
  • Country: es
Re: FPGA help - Big QSPI flash memory solution
« Reply #2 on: September 12, 2016, 04:42:01 pm »
Is QSPI a requirement? If not, then consider parallel memory rather than serial. Lack of I/O pins is not generally a problem with FPGAs and you'll get higher performance. You'll need to analyze the data rate to the OLED to know what your performance requirements will be and whether you can get away with using a QSPI device.

Implementing QSPI is very easy to do in an FPGA. I've done it in less than 40 lines of Verilog, which probably translates to around 60 lines of VHDL.

It is not a requierement, however QSPI memories are the best option in order to get memories with great memories and small footprints. (as long as I am concern!) As you said, I think it will not be a problem to write myselft the QSPI.

I am still not sure whether is it possible to use these big memories as well as the system memory, anyone which experience on that?

Thankyou in advancd!
 

Offline aturcituTopic starter

  • Newbie
  • Posts: 6
  • Country: es
Re: FPGA help - Big QSPI flash memory solution
« Reply #3 on: September 12, 2016, 08:51:49 pm »
Shorter question!

I would like to use iCE40 fpga, it has dedicated SPI interface (Miso Mosi SCLK CS) but it does not mention anything regarding QSPI, would I be able to use QSPI interface? In case I can, should I wire the whole interface to general I/O pins or I can just use this 4 wires specific SPI pins and plug the reminder IO pins to other general IO?

Thanks
 

Offline Ice-Tea

  • Super Contributor
  • ***
  • Posts: 3370
  • Country: be
    • Freelance Hardware Engineer
Re: FPGA help - Big QSPI flash memory solution
« Reply #4 on: September 12, 2016, 09:26:12 pm »
- for a First project: don't mix system and programming mem
- the spartan-6 has a lot more resources. Not saying you can't use the ICE40 but the risk of running out of something is larger.
- have you done some quick napkin math? I assume you Will be using incompressed images to keep complexity down but that's 1M5 per image
- not sure what the ICE40 has in terms of dedicated SPI HW but don't let that be a factor: this is not rocket science...
 

Offline aturcituTopic starter

  • Newbie
  • Posts: 6
  • Country: es
Re: FPGA help - Big QSPI flash memory solution
« Reply #5 on: September 12, 2016, 09:42:45 pm »
- for a First project: don't mix system and programming mem
- the spartan-6 has a lot more resources. Not saying you can't use the ICE40 but the risk of running out of something is larger.
- have you done some quick napkin math? I assume you Will be using incompressed images to keep complexity down but that's 1M5 per image
- not sure what the ICE40 has in terms of dedicated SPI HW but don't let that be a factor: this is not rocket science...

Thank you for your reply:

Yes, the idea is to be using incompressed images, it is needed to display some basic animations, therefore not huge quantities of images will be stored.

To make it more clear, what a I need:
FPGA which is able to interface a QSPI flash memory at high speed (104MHZ clock), to interface an I2C perpheral which will indicate the reading adress of the memory. To interface a VGA display to show the bitmaps images stored in the flash memory. It needs to be done at lowest power consumption and footprint possible.

Does anyone have any advice? Does it make any difference  to have dedicated cores for SPI and I2C compared to created them in as IPs?

PD: I was considering to use ICE40 family since it presents little pinout packages will also will simplify theh PCBA, spartan 7 has too many I/O pins wichi would be unused.

Cheers
« Last Edit: September 12, 2016, 09:52:09 pm by aturcitu »
 

Offline jonrc

  • Newbie
  • Posts: 3
  • Country: dk
Re: FPGA recommendation - Big QSPI flash memory solution
« Reply #6 on: September 14, 2016, 10:51:48 am »
Be careful about what clock frequencies are possible, if you are using the QSPI as configuration device. I have bump limitations around 20MHz for some devices.
Another thing is that some FPGAs read the ID on the QSPI and if the ID is not approved by the FPGA vendor, then the FLASH just won’t work as a configuration device, not that there is anything wrong with the FLASH. So look for approved parts...
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 5385
  • Country: gb
Re: FPGA recommendation - Big QSPI flash memory solution
« Reply #7 on: September 14, 2016, 12:08:42 pm »
Hello all,

After enjoying the EEVBLOG youtube channel the forum for a while, today it is time for me to ask for your help!

Firstly, I would like to clarify that I have some experience working with VHDL and FPGA in general, I have worked or help on some project. However I have never designed a custom board myself. Right know I am working on a project which needs some especial features to be fullfiled and I am confused in some aspects.

What I need: Drive a small WVGA resolution OLED and load bitmaps images pre-stored in a memory at smt around 30 FPS. Therefore the system memory needs to be quite big, I was thinking of an 256 or 512 MB flash memory. The final constraint is that it needs to be as small as possible.

Threfore I was thinking to use a QSPI memory (for instance the S25FL512S) in order to ensure high reading speeds and small factor size. After that, I have been tryiing to find similar projects where similar flash memories where used.  After all this redading I am quite confused,  I am not sure how easy will be to find or create an QSPI interface. Moreover I have found that not all the FPGA are compatible with big flash memories (in order to store the bitstreem there) where some are limited to 16MB.

Also, in my first prototype I was thinking of using an Spartan6 or iCE40HX4K. Finally I donnot want to use any kernel or advance IC. I would like to stick to VHDL code and just use the FPGA as the LCD interface since in the board will be already another uC in charge of the communications 'to the external world'

Would be better to use two different memories for the project? Do you have any other advise regarding choosing the best FPGA?

Thank you in advance, and I hope that you can help me find my way on this project.

Cheers

When you say 512 MB flash memory, do you mean 512 Million Bytes (which is what I think you mean), or do you mean 512 million BITS of memory ?

Because the S25FL512S, which you have used as an example, appears to be only 64 million bytes in size (512 million bits), rather than the 512 million bytes, you seem to want/need.

Most often, memory devices like that, seem to use the millions of bits specification (which REALLY annoys me, as I want it in bytes).

As others have said, the serial bit signals are fairly simple and should not cause you great difficulty to use. Also make sure it is fast enough for your purposes. QSPI probably is, but SPI may not be, especially at lower frequencies (max speeds vary, depending on exact memory chosen).
At 30 frames per second, if the picture/image is big enough, you might overload a slower serial memory device.
 

Offline ale500

  • Frequent Contributor
  • **
  • Posts: 427
Re: FPGA recommendation - Big QSPI flash memory solution
« Reply #8 on: September 16, 2016, 05:09:10 am »
And what about a SD card ? They are also cheap and small, maybe not that fast but definitely > 512 MiBytes. The iCE40 series does not have loads of resources but may be enough, they have few pins in comparison with what you get on standard FPGAs.
Make a prototype, big enough, with QSPI or parallel (there is also parallel NAND Flash in the GByte size) and downsize as needed.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->