Trenz Electronic GmbH Support Forum

Trenz Electronic Products => Trenz Electronic FPGA Modules => Topic started by: VIDZ on April 06, 2016, 11:50:36 AM

Title: Query
Post by: VIDZ on April 06, 2016, 11:50:36 AM
Hi,
   
    We are planning to use the TE0741 Series board with an FTDI chip for an interface to the PC.
Please advise on how the SPI flash on the 741 can be programmed (with the FPGA configuration bitstream) through the FTDI chip (FT2232D).

Regards
Vidz
Title: Re: Query
Post by: Oleksandr Kiyenko on April 06, 2016, 12:52:54 PM
Hi,

SPI Flash have connections only with FPGA, so there is only 2 posibilities to reprogramm it.
1. JTAG
2. SPI core inside FPGA

So if you want to use your custom programming interface you need some initial FPGA project which will
receive data from PC and then write SPI flash. Better to use Microblaze processor to handle PC communication interface and
process Flash commands.
This project should contain at least Microblaze, Microblaze memory, AXI Quad SPI, AXI Uartlite
In sowtware parts should be some implementation of serial interface with PC and flash write functions
Example of Flash write software you can found at https://github.com/Trenz-Electronic/TE060X-GigaBee-Reference-Designs/tree/master/GigaBee_XPS14.2-Base/sw_export/eth_test/src

Best regards
Oleksandr Kiyenko
Title: Re: Query
Post by: VIDZ on April 06, 2016, 01:20:45 PM
Hi,

Thanks for replying.
let's say by some mechanism i change the code of SPI Flash . So, now how to tell the FPGA that re-configure yourself?

Regards
Vidisha
Title: Re: Query
Post by: Oleksandr Kiyenko on April 06, 2016, 02:47:22 PM
Hi,

To reconfigure you have to drive some FPGA output pin low, this pin (signal) should be connected to RESIN signal on mainboard.

Best regards
Oleksandr Kiyenko
Title: Re: Query
Post by: Antti Lukats on April 07, 2016, 09:35:20 AM
Quote from: VIDZ on April 06, 2016, 01:20:45 PM
Hi,

Thanks for replying.
let's say by some mechanism i change the code of SPI Flash . So, now how to tell the FPGA that re-configure yourself?

Regards
Vidisha

It is very simple with the use of ICAP IP Core wrapper, you can restart configurtion either from SPI offset 0 loading the master bitstream, or specify new start address and reconfigure FPGA with alternative bit file. This is explained in many Xilinx documents, and we also have demos that we can make available to demonstrate this use.

Title: Re: Query
Post by: VIDZ on April 11, 2016, 01:16:19 PM
Hi,

actually now i'm trying FTDI standard JTAG connection to 741 jtag by using opensouce XC3SPROG to flash the SPI,
but my Fpga is only getting detected not the Flash,
so what could be the reason?

Regards
Vidisha


Title: Re: Query
Post by: VIDZ on April 11, 2016, 01:34:45 PM
Here is the screenshot of the error..
Title: Re: Query
Post by: Antti Lukats on April 11, 2016, 03:30:22 PM
TE0741 is KINTEX based and not Spartan-6, you screenshot is shows you have connected a ZTEX product?

I have not used xc3sprog long time, i know it can be used, but I do not remember if there is an option to scan SPI Flash id code, maybe there is

toolz CAN display spi ID Code
Title: Re: Query
Post by: VIDZ on April 12, 2016, 10:38:33 AM
ok,

please can you tell me how to program the flash on TE0741 device through Fpga?


Regards
Vidisha
Title: Re: Query
Post by: Antti Lukats on April 12, 2016, 10:58:49 AM
1) vivado
2) xc3sprog
3) toolz

all those do it prtetty much similar: FPGA is loaded with "jtag to spi" gateway then special jtag protocol is used to flash

http://www.trenz-electronic.de/de/download/d0/Trenz_Electronic/d1/ToolZ.html

did you try ToolZ ? it should just work..
Title: Re: Query
Post by: JH on April 12, 2016, 11:51:44 AM
Hi,

to use  Vivado or Vivado Labtool do the following steps:
1. Open Vivado/Labtools
2. Start Vivado Hardware manager (Vivado only)
3. Run Open Traget --> Auto Connect
Now you should see the FPGA in the Hardware-Window
4. Right Click on the FPGA --> Add Configuration Memory Device
Select the Flash-Memory from your Board (for TE0741 Revision02 it should be S25FL256SAGBHI20 (3.3V))
5. Click Ok
Now the memory is displayed in the Hardware-Window

You can find more information about programming FPGAs in the Xilinx documents (Programming Flash Page35):
http://www.xilinx.com/support/documentation/sw_manuals/xilinx2015_4/ug908-vivado-programming-debugging.pdf

bg
John