Configuring spartan 6 using mcu and spi flash

http://forums.xilinx.com/t5/General-Technical-Discussion/Configuring-spartan-6-using-mcu-and-spi-flash/td-p/88658

I'm currently using spartan 6 in my design and I was wondering if I could configure it using MCU to download fpga design file into the spi flash.  In other word, can I download a prom file into the spi flash with a MCU?  I'm used to downloading a prom or a spi flash using impact software.

 

Here is my design:  I have a data interface between MCU and FPGA via SPI.  I also have SPI flash that I want to use to configure my fpga.  However, I like to tie in all spi interface lines between mcu, fpga, and flash.  I am little confused because the fpga is spi master and I don't know how its going to chip select the flash to configure if the mcu have to download the spi flash first (if possible). 

 

thanks,

There are several ways to fry this egg:

 

1.  Connect SPI flash to MCU only, and have MCU configure the FPGA at power-up.  FPGA will need to be set up for 'slave serial' or 'slave parallel' configuration mode.  The FPGA has nothing to do (directly) with the SPI memory.

 SPI Flash <-----> MCU  <-----> FPGA

2.  Connect both the MCU and the FPGA to the SPI memory.  MCU and FPGA must both be an SPI master. 

The MCU must 'disable' its SPI interface when the FPGA is trying to boot from the SPI device. 
The MCU must disable the FPGA's SPI interface when the MCU wants control of the SPI device. < PROGRAM_B = LOW >

FPGA <----\ 
           \ SPI Flash
           /
MCU  <----/

 

3.  Connect the SPI flash memory only to the FPGA, and MCU access to the SPI device is indirect, using the FPGA as a 'pass-through' or as a generic peripheral port for the MCU.  If you choose this approach, you will need to install baseline boot code in the SPI memory -- Xilinx Impact software plus USB platform cable connected to the FPGA's JTAG port is an off-the-shelf solution.

 MCU  <-----> FPGA <-----> SPI Flash 

- Bob Elkind

 

posted @ 2013-08-09 18:45  IAmAProgrammer  阅读(900)  评论(0编辑  收藏  举报