cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
2,231 Views
Registered: ‎03-22-2018

Trouble programming SPI Flash via XSVF

Jump to solution

This is similar to the question posed by quique “Program Kintex with xsvf player based on xapp058.”

 

The problem: We are trying to use XSVF files to program an SPI Flash connected to an Artix7. We have used XSVF files to program the FPGA (using iMPACT and embedded software using Xilinx code), but all attempts to program the SPI Flash using this method are being thwarted.  The end objective is to program the Flash with an embedded processor.  We can program an SVF with similar content from iMPACT and Vivado.  Please confirm that an XSVF file can be used to program an SPI Flash connected to an Artix7.  I have listed the parts of interest below. 

 

FPGA                                     SPI Flash

XC7A35T-1CPG236C       N25Q032A

XC7A100T-2CSG324C     S25FL256S

XC7A200T-2FBG676I       MX25L25635F

 

UPDATE: Based on my initial help response, I would like to clarify that I am programming a bitstream into the SPI Flash. 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
2,606 Views
Registered: ‎09-24-2007

Hello,

    Below is the flow they used to successfully execute a XSVF file that Indirectly programs a SPI flash attached to a Artix 7 FPGA and boots upon power cycle.

 

[Vivado]>.bit>.mcs - Use VIvado or ISE to generate working bit file and MCS file

[iMPACT] bit & mcs > SVF - Use iMPACT 14.7 to generate SVF file from MCS file

[svf2xsvf502] SVF > XSVF - Use XAPP058 svf2xsvf502.exe to generate XSVF file (Use switches below)

[iMPACT] XSVF played into FPGA/Flash - Use iMPACT 14.7 to execute XSVF file

 

>svf2xsvf502 cmd line used: >svf2xsvf502 -r 0 -fpga -rlen 10000 -xwait -i inputSVF.svf -o svf2xsvf_output.xsvf

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

8 Replies
Highlighted
Mentor
Mentor
2,219 Views
Registered: ‎02-24-2014

The usual method to do this involves an SPI interface inside your FPGA design which gives access to the SPI flash from your embedded processor.   Once you have this functionality,  you can run software algorithms on the processor to program the SPI flash with the desired data.   XSVF is not really needed, since usually you want to store a compressed binary image of the FPGA bitstream in the storage space of the embedded flash.   Other methods involve sending the FPGA data to the embedded processor via a network connection.   

 

Impact and Vivado hardware manager accomplish the SPI programming via an indirect method (documented in XAPP586).  Indirect means that a temporary FPGA image with an SPI interface is loaded into the FPGA, to provide the connectivity between the JTAG interface and the SPI flash.

Don't forget to close a thread when possible by accepting a post as a solution.
0 Kudos
Highlighted
Visitor
Visitor
2,200 Views
Registered: ‎03-22-2018

Thank you for the reply, but this is proposing an alternative solution, rather than advice on the problem at hand.  

 

My conundrum with the XSVF is that we have a requirement to use that file format.  Deviating from it is our last choice.  Indeed, we originally considered writing our own TAP to take JTAG commands to convert to SPI commands.  But I am very concerned that the XSVF format has limitations that prevent us from using it for this FPGA/"PROM" combination.  In fact, I get warning statements from the SVF to XSVF converter that the RUNTEST commands.   That is from an SVF created in iMPACT.  SVF files created in Vivado cause the converter to throw an error, so we can't use that approach.  So we have used Vivado to built the bitstream and MCS file, then used iMPACT to create the SVF/XSVF.  The SVF plays in iMPACT.  The XSVF does not.  However, we can create an XSVF that only programs the bitstream, and that works.  But the current system design does not provide for non-volatile storage of the bitstream on the processor card, we have allocated that storage to the SPI Flash connected to the FPGA.

 

Bottom line, I still need help.

 

 

0 Kudos
Highlighted
Mentor
Mentor
2,194 Views
Registered: ‎02-24-2014

If I understand right,  you want your embedded CPU to duplicate the indirect programming trick that Impact does with a JTAG cable and an Artix device with attached SPI prom?     It's going to be very difficult.    SVF and XSVF operate under the assumption that the target device is actually attached to the JTAG chain.   That's not the case here.    You could probably get it to work if your embedded device has some GPIO pins that can be driven as a JTAG chain, and these GPIO pins are directly connected to a JTAG port on the SPI device.   Then you could use an XSFV software player on that special JTAG chain. 

 

But with the indirect connection you have now,  your best bet is an FPGA interface to the SPI, and then run a programming algorithm on the embedded CPU to program it.    It could be XSFV, but this will only complicate matters.  

Don't forget to close a thread when possible by accepting a post as a solution.
0 Kudos
Highlighted
Moderator
Moderator
2,108 Views
Registered: ‎01-15-2008

@vunderwo

are all the three Artix-7 devices in JTAG chain? 

A7 35T is not supported in impact tool? so are you using impact tool to execute the xsvf file for the A7 35 T device?

0 Kudos
Highlighted
Visitor
Visitor
2,103 Views
Registered: ‎03-22-2018

These are FPGA/Flash combinations used in separate hardware configurations, ie only one FPGA/Flash at a time will be interfaced.

 

I have not been able to see the A7 35 from iMPACT (using a Digilent CMOD board), but I was already aware that Vivado should be used for development/programming.  But I do think I could use iMPACT by adding a A735 BSDL file.  As it is, I won't be trying that out because the CMOD is causing our corporate PCs grief.  I also have a Digilent Nexys4 with a A7 100 that does not cause the same grief, so I will be using it instead for development.  It should also be supported in iMPACT based on my survey of supplied BSDL files in the ISE 14.7 folder.

 

FYI: Our Xilinx FAE has provided some info this morning that I need to try out.

0 Kudos
Highlighted
Visitor
Visitor
2,071 Views
Registered: ‎03-22-2018

Our Xilinx FAE provided the required guidance for running the SVF to XSVF converter with the proper command line parameters to generate a proper XSVF file.  This has been verified to work on three different Artix/ SPI Flash combinations using iMPACT and the embedded XSVF player code (downloadable from xapp058).  Note: we have only verified this on Artix 100 and 200 devices (both are supported by iMPACT in ISE 14.7).

Highlighted
Mentor
Mentor
2,069 Views
Registered: ‎02-24-2014

Please share this guidance!   How did you do it?

Don't forget to close a thread when possible by accepting a post as a solution.
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
2,607 Views
Registered: ‎09-24-2007

Hello,

    Below is the flow they used to successfully execute a XSVF file that Indirectly programs a SPI flash attached to a Artix 7 FPGA and boots upon power cycle.

 

[Vivado]>.bit>.mcs - Use VIvado or ISE to generate working bit file and MCS file

[iMPACT] bit & mcs > SVF - Use iMPACT 14.7 to generate SVF file from MCS file

[svf2xsvf502] SVF > XSVF - Use XAPP058 svf2xsvf502.exe to generate XSVF file (Use switches below)

[iMPACT] XSVF played into FPGA/Flash - Use iMPACT 14.7 to execute XSVF file

 

>svf2xsvf502 cmd line used: >svf2xsvf502 -r 0 -fpga -rlen 10000 -xwait -i inputSVF.svf -o svf2xsvf_output.xsvf

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post