cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
284 Views
Registered: ‎12-17-2019

Split the flash

Jump to solution

Hi,

i am able to successfully program the flash and boot (spartan-7)fpga from it,But how to split the flash in two half sectors and then test read-write operations,i am using S25FL128SAGNFI000 spi Flash,and i am using vivado 2017.4

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
121 Views
Registered: ‎01-22-2015

There is no procedure for "splitting" the flash.  Instead, you simply use address locations 07FFFFFh to 0FFFFFFh for your own read/write.  By using these high address locations, you will avoid overwriting the bitstream.

View solution in original post

0 Kudos
7 Replies
Highlighted
224 Views
Registered: ‎01-22-2015

@krn-krn 

  1. The S25FL128S flash holds 128 mega-bits or 16 mega-bytes of data.  The flash memory is organized in bytes and the bytes have addresses from 0000000h to 0FFFFFFh.

  2. Table 1-1 in UG470 shows that Spartan-7 bitstreams have sizes from 8-32 mega-bits or 1-4 mega-bytes.  So, the largest Spartan-7 will use only about ¼ of the S25FL128S flash memory.   

  3. Bitstreams are normally stored in flash starting at address, 0000000h.  So, the largest Spartan-7 will use locations 0000000h to 03FFFFFh.

  4. So, you can split the flash in half and use locations 07FFFFFh to 0FFFFFFh for your own read/write – and you won’t overwrite the bitstream.

  5. You can read/write the flash from your HDL using the existing SPIx1 interface between the FPGA and the flash, which consists of the four FPGA pins called MOSI, DIN, FCS_B, and CCLK.  After FPGA configuration, all of these pins become user IO, except CCLK, which you can access using the STARTUPE2 primitive (ref UG953(v2020.1), page 583).
    7Series_FPGA_to_flash.jpg

  6. Xilinx provides IP to read/write flash using SPI (see AXI Quad SPI in document PG153).

  7. You can also write your own HDL for SPI communications with flash.  See <this> post for some guidance.

Cheers,
Mark

0 Kudos
Highlighted
Contributor
Contributor
173 Views
Registered: ‎12-17-2019
I am new to fpga,its my first project,where should i edit the address ,
if you have screenshots share me ,flash size is 128 megha-bytes,If you have any examples related to that please share me.
0 Kudos
Highlighted
Contributor
Contributor
164 Views
Registered: ‎12-17-2019
Can we edit the address in "Write Memory Confiration File" widow?
0 Kudos
155 Views
Registered: ‎01-22-2015

In addition to the bitstream, what do you want to write to the flash?

0 Kudos
Highlighted
Contributor
Contributor
137 Views
Registered: ‎12-17-2019
Just i want to check read and write operation,i followed this "So, you can split the flash in half and use locations 07FFFFFh to 0FFFFFFh for your own read/write" and i am able to see address are changing.
0 Kudos
Highlighted
122 Views
Registered: ‎01-22-2015

There is no procedure for "splitting" the flash.  Instead, you simply use address locations 07FFFFFh to 0FFFFFFh for your own read/write.  By using these high address locations, you will avoid overwriting the bitstream.

View solution in original post

0 Kudos
Highlighted
Contributor
Contributor
113 Views
Registered: ‎12-17-2019
Thank you.
0 Kudos