I’ve been working with a VHDL design that uses block RAM to store some data that I’m processing. I’m able to look up addresses in the BRAM and get values back a cycle later, and it’s all working fine. I now need to store and process more data than can fit into BRAM, so I’m looking at using the on-board flash, which I believe should have more than enough capacity. For reference I'm currently using a Genesys 2 board, but I'd like my approach to also be valid on an Arty S7 board too.
In Vivado I’ve successfully used flash to store the FPGA bitstream (so that my design survives the board being powered off), and that’s about as much as I’ve ever seen about flash: I’ve no other experience of what to expect when using flash, or AXI, or SPI, etc. But I’ve done some reading around and pieced a few ideas together, and I now think I’ve got a plan for something that might work.
But I’d really appreciate some feedback from people here as to whether I've stumbled upon a reasonable approach, or if I’m missing a much better way to do things.
Here’s my current sketch of how I plan to access my data stored on the on-board flash.
Add an AXI Quad SPI flash IP core to my design, because that’s a thing that knows how to talk to SPI flash.
Wire up that core into my VHDL logic.
Work out how to communicate with the flash over AXI (or SPI?), and write some logic for that into my VHDL design.
Instead of sending the read addresses to BRAM as I currently do, send them instead to this new logic that I’ve written, which will fetch values from the flash storage for me. Be prepared to wait for more cycles than before.
Instead of incorporating the BRAM data directly in my VHDL files, create a separate data file with the data that I need to store.
Use the ‘write_cfgmem’ command and the ‘-loaddata’ option to build an MCS file that contains my data alongside the FPGA bitstream.
Tell Vivado to load that combined result into the flash memory.
Does that (or even any part of that) sound sensible to anyone? Am I missing a simpler way?
I would ideally like to treat the flash just like a simple ROM (send addresses in, get values out), so if there’s a more direct way to do that I’d really like to be aware of it. But since I don't know what I don't know, I'd also appreciate any replies that just say "Yes, that's how I'd do things too."
Question
pdw
Hi all,
I’ve been working with a VHDL design that uses block RAM to store some data that I’m processing. I’m able to look up addresses in the BRAM and get values back a cycle later, and it’s all working fine. I now need to store and process more data than can fit into BRAM, so I’m looking at using the on-board flash, which I believe should have more than enough capacity. For reference I'm currently using a Genesys 2 board, but I'd like my approach to also be valid on an Arty S7 board too.
In Vivado I’ve successfully used flash to store the FPGA bitstream (so that my design survives the board being powered off), and that’s about as much as I’ve ever seen about flash: I’ve no other experience of what to expect when using flash, or AXI, or SPI, etc. But I’ve done some reading around and pieced a few ideas together, and I now think I’ve got a plan for something that might work.
But I’d really appreciate some feedback from people here as to whether I've stumbled upon a reasonable approach, or if I’m missing a much better way to do things.
Here’s my current sketch of how I plan to access my data stored on the on-board flash.
Does that (or even any part of that) sound sensible to anyone? Am I missing a simpler way?
I would ideally like to treat the flash just like a simple ROM (send addresses in, get values out), so if there’s a more direct way to do that I’d really like to be aware of it. But since I don't know what I don't know, I'd also appreciate any replies that just say "Yes, that's how I'd do things too."
Many thanks in advance,
Paul.
Link to comment
Share on other sites
12 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now