Jump to content
  • 0

Cmod S6, access SPI flash from VHDL


s.schwarzbauer

Question

Hi,

 

I successful use the Cmod S6 now for ~2 years. I am used to flash the code into the SPI flash attached by iMPACT. I still use Xilinx ISE 14.7 and it works without issues.

Now I get another application and will need a bigger data buffer like 4-10KB. So I have the idea to store the data in the SPI flash. Is there a memory layout existing what memory area can be used by the user data? Or is it defined by the user code size? If yes how to find this size so that I can use a address not interfere with my user data.

If it is possible to use the assembled SPI flash for user data is there a VHDL example existing? Or can I just any VHDL example as I have the pins by the schematic?

 

thx a lot for help!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

ISE will use the beginning of your flash for your bit file.  Once the bit file has been copied to the flash, the rest of the flash is yours to do with as you please.  Well, to be a touch more precise, it will use the beginning of your flash for your bin file--a bin file is a bit file minus a small (36byte?) header, so they're almost the same thing.  The flash size on the S6 is 16MB, and of the two bit files I have lying around, one is 334kB and the other is 273kB.  You should therefore have plenty of room left over.  I'd be tempted to grab the last 15MB, but you could probably even grab another half MB or more.

I do have a Verilog example that uses flash memory on the S6.  It was a test of an earlier version of the ZipCPU--a CPU designed to work in an area efficient environment.  The design places what I call a "multi-tasking OS" onto the S6.  It then runs a series of  (mostly) independent programs, time slicing between them.  Due to the lack of RAM on the S6, the majority of the software is placed into flash.  For performance reasons, a small piece of code was placed into block RAM--mostly for interrupt handling and such.  Further, due to the lack of area, the design that loaded the flash in the first place was separate from the design having the CPU within it.  (Both are in the same repository.)

Dan

Link to comment
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
×
×
  • Create New...