Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ft2232 jtag with FPGA

Status
Not open for further replies.

KobusG

Newbie level 5
Joined
May 8, 2009
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,385
I plan on developing an altera cyclone based USB device with the ft2232 for the connection. I,ve seen some people use openOCD to program FPGA's via ft2232, but i would like to know if it would be possible for me to allow customers to update the device firmware from my own software written for it with the d2xx drivers?(eg, via a dll etc.)

i dont know much about jtag...
 

I just released a SVF player application for the FTDI FT2232 chip. There is also a sample application for updating the firmware (which uses the SVF player code).
If the Altera software can generate SVF code then you should be able to update your firmware.
The software has only been tested with SVF output generated from the Xilinx ISE.

For the 'firmware' application you have to have a Delphi compiler, since the application 'includes' the firmware that it programs.
The SVF player application itself can be used to upload an SVF file (which can be your firmware), or to issue manual SVF commands.

You can find the software here:
https://www.majority.nl/projects_miscellaneous.htm
or the file as direct link:
https://www.majority.nl/files/svfplayerv100.zip
 

The best solution depends on the intended functionality for the JTAG interface. Native JTAG can be easily handled with FTDI
MPSSE protocol through d2xx driver. If Altera tool compatibility is required, e.g. to perform indirect JTAG programming, you
should go either for an Altera USB Blaster emulation (using a CPLD) or utilize the BeMicro Arrow-USB Blaster driver for FT2232.

It's not clear what "update the device firmware from my own software" means. Which configuration memory is receiving
the update, using which interface?
 

Thanks for the replies. Is the svf player the same as the one provided by amontec? ill look into this.
just to be clear:

Code:
 -----       --------                 ------  
| PC  |-----| ft2232 |---fifo data---| FPGA |
 -----      |        |-----jtag------|      |-----config chip
             --------                 ------

the program the FPGA has to run, is on the flash chip to be loaded every time the fpga is booted. afaik you can load a program onto the flash chip via the fpga's jtag by including a jtag component in the fpga's program.
while developing, ill probably work with the usbblaster, but once i have a stable firmware update compiled, i would like to be able to email it to my clients and let them simply load it onto the computer side software i had written for the device, and let it configure the ft2232 via d2xx into the jtag mode, and then load the config file on the fpga to load in the flash chip. make sense?
i know the obvious answer is to get the program running properly before selling it, but the reason is that im creating 2 products side to side, one being a low cost FPGA dev board, with the ability to self program, and the other a high speed signal analysis tool, which i felt would be good if it could have similar update ability to allow customers firmare updates.

i have the firmware for ther usbblaster that was floating arround this forum, and have managed to recreate a functional usbblaster with an old actel fpga devboard and a ft245, so that is always a second option - let half the ft2232 act as a ft245 and a small bit of the fpga interact with it as a usbblaster hard connected to the flash chip...
 

Remote update capability is always a useful feature. But I don't exactly understand how you want interface the
configuration memory through JTAG. Altera has the serial flash loader IP, usually it's operated by Altera programming tools.
You could basically use your own tools instead, but the protocol isn't coherently documented.
 

It's not clear what "update the device firmware from my own software" means.
This means that the SVF code, needed for updating the device, can be incorporated in an utility that acts as standalone application. It is basically the same as the normal SVF player, only with fixed SVF code contents. It can only send these fixed SVF code to a device.

Is the svf player the same as the one provided by amontec?
No, it is a complete separate development. Being a SVF player, it should have the same functionality though.

Your configuration (config chip accessible via the FPGA) should work. The only problem is that it needs to be supported by the programming software otherwise development can become difficult.
From the Xilinx software I know that, if the programming software supports it, then it can generate SVF code for it. All programming code can be exported to SVF format. I'm not sure if this is the same for Altera software.
 

All programming code can be exported to SVF format. I'm not sure if this is the same for Altera software.
I think, it isn't, that's wyh I asked about the intended access method.

At present, the "JTAG indirect programming" is performed as a multi-step process controlled by the Altera programming tool,
starting with flash erase, programming, optionally verify. At each step, the software is scanning a status and waiting
for completion. The process could be coded to a SVF file, if maximum wait times are inserted for each step. But I'm not aware
of a tool performing the conversion.
 

ja, the jtag flash config IP was what i had in mind, but it never occured to me that it might only work with altera hard/software.
how is it then that everyone with a regular ft2232 programmer programs their fpga?(openocd, svf or otherwise?) Do they basically only load the fpga, essentially losing config data every time the device is rebooted? that being the case, can those programmers connect directly to a config flash once they are happy with the design?

PS: sorry, i don't know a lot about this sort of stuff...

Added after 9 minutes:

It just occurred to me, maybe its not such a bad thing not being able to program the flash config chip...since the device has to be run with computer side software every time, i could just load the newest version every time the program is started. that way it even provides a degree of tamper-proofing and/or license protection, while still allowing daring users the ability to hack the device without permanent damage.

Added after 45 minutes:

found this site again. actually forgot about it, but this is pretty much what i want to do.

https://www.easyfpga.com/ez1cusb_features.htm

they seem to have the mpsse of the ft2232 connected to the serial flash chip rather than the jtag port...

Added after 5 hours 23 minutes:

i've found an even better site

https://www.hdl.co.jp/en/index.php/acm/eda-004.html

they eve give schematics. ill spend some time studying what they did...
 

Hi all,

Did anyone try implementing the above designs? Please let me know what the outcomes have been.

Thanks and Regards,
John
 

Check out **broken link removed** and https://sourceforge.net/apps/mediawiki/urjtag/index.php?title=Cable_FT2232.

If it is for commercial purposes I would use libftdi , since libftd2xx is proprietary. Maybe libftd2xx is okay too, that would depend on the licensing scheme...

As for urjtag, it's a further development of openwince and works great for all jtag cables I have. Mind you I work under linux, so no personal experience how urjtag behaves on windows. But according to the docs it should work just fine, plus I see plenty posts out there of urjtag users on windows.

Hope that helps.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top