Jump to content
  • 0

Nexys 4 flash memory access for storing data


weipau

Question

Hi all,

I had read the spec from https://reference.digilentinc.com/_media/nexys4-ddr/nexys4ddr_rm.pdf , under 4.2 Quad-SPI Flash, stated An Artix-7 100T configuration file requires just less than four MiB (mebibyte) of memory, leaving about 77% of the flash device available for user data. My question arise when after configured the FPGA, i was desire to access the flash memory to store or load some data other than the configuration bitstream, is it possible to done with the existing Quad SPI by Xilinx? or i need to develop my own SPI controller, but the existing Quad SPI already occupied the pin for flash memory, so how can it be done?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

Yeah, writing and using the QSPI Flash for whatever is really cool.  I've now done it for a Basys-3 project and a CMod-S6 project.  On my Basys-3 project  I use the QuadSPI flash as a location for an alternate configuration file, and on my CMod-S6  project I use it as both a place for an alternate configuration file as well as a location to place computer executable code that I can run a soft core from.

You can find the Quad SPI flash controller I've been using here.

You can find a copy of my CMod-S6 project here.

Hope this helps,

Dan

Link to comment
Share on other sites

Dear Dan, really really thanks for your sharing, it's really help for my FPGA-based soft core design. But I have one more question, when first power up your FPGA device, is it using the xilinx "original" Quad SPI to load the first ever configuration bitstream instead of using your own design Quad SPI? How's about the when reconfiguration that time, "original one" or yours?

I really appreciate your help, Thanks.

Link to comment
Share on other sites

6 minutes ago, weipau said:

Dear Dan, really really thanks for your sharing, it's really help for my FPGA-based soft core design. But I have one more question, when first power up your FPGA device, is it using the xilinx "original" Quad SPI to load the first ever configuration bitstream instead of using your own design Quad SPI? How's about the when reconfiguration that time, "original one" or yours?

I really appreciate your help, Thanks.

The FPGA has within it a Quad SPI reader that it uses to read its configuration.  This reader exists even in the absence of any configuration.  Once the device has been configured, the loaded configuration takes over and the Quad SPI pins are available for your usage.  The same is true when reconfiguring.  It really makes sense when you think about--when the configuration on the device is in flux, you really can't depend upon it to do anything for you.  Therefore, the FPGA uses its own internal firmware and does not depend upon the user supplied controller at all.

If what you are worried about is that you might replace the Xilinx flash controller with a broken controller and therefore brick your device, then relax.  It doesn't work that way.  If your controller doesn't work then you can still load the device as you would've without the Quad SPI flash controller--either by JTAG, USB stick, or SD Card.

But I notice you mention above that you will be generating a soft core.  Did you notice that the S6SoC I referenced above runs its code both in place from flash, *and* has a boot loader that copies certain portions of its memory image from flash to RAM?  I guess I'm still somewhat proud of building in this neat new feature ...  It took a bit of trickery with the linker to get that to work.  :P  Not only that, without it I wouldn't have gotten the audio to run in a timely fashion.

Yours,

Dan

Link to comment
Share on other sites

oh yay, thanks Dan, all my problem solved!

 

By the way, I will look into your work in opencores.org deeply, that boot loader thingy may comes to me soon, once i had dealing with all those I/O peripherals. Anyway, thanks thanks thanks and thanks.....^.^ 

Link to comment
Share on other sites

Oh, I should offer you one warning: the Flash controller I've got allows you to reprogram the configuration and status registers.  One of my programs accidentally reprogrammed those and the chip has never quite been the same since.  In other words, you might wish to be careful with those.

Good luck,

Dan

Link to comment
Share on other sites

It is very useful and actually i planned to do this before, but it require some soldering work on such little tiny pins on the flash chip, which I didn't dare to. So, i just hold on for this and will consider this after my whole design complete. Anyway, thanks for your recommendation. Keep in touch. Thanks.

 

Weipau

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...