• 0
Shaw

How to write or read Nexys4 DDR QSPI Flash

Question

Hello,

I am using Nexys4 DDR and Vivado2017.3(Windows).

I want to store some data(instructions) in the qspi flash, and when the board starts, I want to load these data into bram(in the FPGA).

I am designing such a program in assembly language(MIPS). I want to know how I need to write this program. 

Just need to use simple load instructions just like load data from bram? And then, how does the qspi flash controller(AXI IP) convert the load instruction into a spi flash command?

I am a newbie of FPGA, I don't know if my description is clear enough.

Finally, thanks for your help.

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Looking for an open source flash controller you could use?  You might wish to try this one.  You can find it integrated into several open source ZipCPU projects, to include this one.  That includes not only the flash controller, but also software to read an ELF file and program the flash with it.  The cool thing about all of the above is that you can then run the whole thing through an open source similator.  For example, here's a post showing the difference between using a DMA to copy instructions from flash to RAM, and running the same program from flash memory directly (with an I-cache mind you).

Dan

P.S.  I'm hoping to blog about how to build an I-cache soon enough, so that might be a next blog article on zipcpu.com

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, [email protected] said:

Looking for an open source flash controller you could use?  You might wish to try this one.  You can find it integrated into several open source ZipCPU projects, to include this one.  That includes not only the flash controller, but also software to read an ELF file and program the flash with it.  The cool thing about all of the above is that you can then run the whole thing through an open source similator.  For example, here's a post showing the difference between using a DMA to copy instructions from flash to RAM, and running the same program from flash memory directly (with an I-cache mind you).

Dan

P.S.  I'm hoping to blog about how to build an I-cache soon enough, so that might be a next blog article on zipcpu.com

Thank you for your reply!

I will first check the blog and projects you gave. 

Waiting for your new blog:lol:

Shaw

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now