cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
5,679 Views
Registered: ‎11-03-2013

QUAD SPI flash controller

I'm new to Xilinx designs, I want to use the SPI flash to program the kintex FPGA I have.

If I understand correctly, I need to connect the SPI controller to the flash to program it first.

I want to use for this controller a ready to use IP from Xilinx (quad SPI), but when I try to connect the signals I'm getting an error saying that the pin that I need to use for the clock (CCLK) can't be connected ("dedicated pin").

I'm using the 160t kintex, this pin is C8 but Vivado (2015.4) won't let me connect the clock from the SPI controller to this pin.

How can I connect the clock to this pin or what is the correct way to use the external SPI flash (N25Q128A from Micron)?

0 Kudos
4 Replies
Highlighted
Moderator
Moderator
5,678 Views
Registered: ‎01-15-2008

Re: QUAD SPI flash controller

Hi,

 

if you have the board ready with spi interface to fpga then you can use the vivado programmer to program the spi flash

.

First you wil need to convert the bit to mcs file.

The programming logic which is required to program the spi flash is automatically loaded by vivado programmer during programming

Following links will help

http://www.xilinx.com/support/documentation/application_notes/xapp586-spi-flash.pdf

http://www.xilinx.com/support/documentation/sw_manuals/xilinx2016_2/ug908-vivado-programming-debugging.pdf

0 Kudos
Highlighted
Scholar
Scholar
5,658 Views
Registered: ‎06-05-2013

Re: QUAD SPI flash controller

@goychman There are 2 thing here

 

1) If you would like to just program fpga using Spi flash then there is no need to have quad spi ip in your design, You can use the vivado hardware manager to program the flash, after successful programming of the flash upon power on fpga gets configured from the spi flash

 

2)For  Post-configuration Access, if you would like to read/write data to the spi flash then you need AXI QUad SPI (Controller) which can communicate with the flash once the configuration is done.

 

Now to answer your question:

 

I'm using the 160t kintex, this pin is C8 but Vivado (2015.4) won't let me connect the clock from the SPI controller to this pin.

How can I connect the clock to this pin or what is the correct way to use the external SPI flash (N25Q128A from Micron)

 

Configuration clock (CCLK) is the dedicated configuration pin which cannot be constrained. for the first use case once fpga configuration is done fpga internal configuration logic stops driving the cclk to the connected spi flash but for the 2nd case i.e post configuration flash access you need this clock to be driven continuously to the spi flash hence you have to instantiate the startupe2 primitive in the design which would drive the cclk using internal generated clock. In the AXI Quad SPI Ip you just have to enable the include startup primitive while customizing the IP and constraint other ports (MOSI,MISO,CS).

 

-Pratham

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
5,654 Views
Registered: ‎08-01-2008

Re: QUAD SPI flash controller

It is not possible use the CCLK pin in the FPGA. Check the schematic for your board as there must be another clock source on another pin.

if ther isn't then you will need to modify the board to fix this problem.
Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
Highlighted
Observer
Observer
1,647 Views
Registered: ‎08-18-2017

Re: QUAD SPI flash controller

Hi Pratham,

 

If I would like to design a simple controller to write bit files to the axi_quad_spi controller, or read files from the flash, how do I hook up the quad_spi_controller and write 32 bit words organized from a new bit file?  This will be in system, without Vivado connected.

 

I built the example project included after I included the axi_quad_spi IP in my Artix-7 200t FPGA.  I will not have a processor to operate the axi bus.  I will just be downloading the raw bit file from a data path source into the FPGA.

 

Surely, someone has built a simple controller. 

 

Regards,

 

Keith

0 Kudos