electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

another thread about USB cables for CPLD's/FPGA


Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design -> another thread about USB cables for CPLD's/FPGA
Author Message
Buriedcode



Joined: 06 May 2004
Posts: 327
Helped: 34
Location: London


Post08 Feb 2009 1:06   

ft245rl vb.net


Hi,

I haven't posted here in a while, so bare with me. I have serached this forum, and many others, as well as google itself for idea's on how to solve the ever growing problem of 'programming CPLD's with no parallel port on PC'.

On my new computer, I no longer have a spare PCI slot for a PCI parallel port, and I would also like to be able to update firmware on CPLD boards using my laptop. We're going USB. And I am fully aware that current USB-LPT converters do not work.

I use many different devices, mainly Xilinx, Altera and lattice, and have built/purchased an LPT download cable for each vendor, with great success. In the future, if I get a new PC I will use my LPT PCI card, so I can use the parallel download cables. I will also order a device from this guy:

http://www-user.tu-chemnitz.de/~heha/bastelecke/Rund%20um%20den%20PC/USB2LPT/index.html.en

But I am dubious about whether it will actually work with all three parallel port download cables, as well as the speed issue.

So ultimately, my situation is: Need to program/download to CPLD's from lattice, Xilinx and Altera, using a USB port, and windows software. - preferably a nice simple GUI interface. I do NOT require any form of debugging, or special functions, purely just to get the JEDEC/SWF/STAPL file into the CPLD. This can use SVF files generated by all three vendors (if they are compatable), or STAPL files, it seems that all three vendors DO provide multiple options for outputting different file types.

Cost is a sensitive issue. I do not do enough work with these devices to warrent spending $$$ on a large commercial system, plus I am very intersted in 'rolling my own'.

Now, if anyone has done research on this will know, there is a LOT of information out there, and various commercial, as well as open-source, projects. This is confusing and overwhelming, as some of it is outdated, some is biased towards only a single vendor (xilinx, or altera mainly) or with host software used for integration into a debugging enviroment.


Hardware: Many devices, ranging from Altera USB blaster clones, Xilinx USB clones, FT2232 based devices, Cypress FX-2 devices, even AVR. It seems that the hardware/firmware side is well documented, and I don't think I would have trouble cloning one of these ideas. As long as it can be used with 'good' host software, the only issue with it would be the programming speed. I'm not after getting a 6mbit bitfile to an FPGA in less than 10 seconds, but I would hope that it would be as quick, if not quicker than the parallel port cables.

Software: This is where it gets tricky. OpenOCD, UrJTAG and many others seem to require compiling on linux based systems. I am a hardware engineer, with some knowledge of highlevel programming and OS enviroments, but not enough to be comfortable compiling my own. The documentation for both the above opensource programs is beyond my understanding, as I am a simple user who prefers pretty windows based GUI's as opposed to command line/DOS/linux apps.

Ideally, I am looking for a small standalone app, with GUI< that runs on windows, which can simply take in an SWF file (or stapl, or perhaps multiple file types), detect the USB cable, detect the device and program it. The use of SVF files *should* allow me to use the same software/hardware for all xilinx/altera/lattice devices I use. (almost ALL CPLD's with JTAG)

The real confusing point is where to start? I could attempt to write my own from scratch, but this would seem counter-productive as there are so many opensource projects out-there which do most of the work.
Does the Altera, or xilinx cable support programming of NON vendor devices using the generic SVF file? If that is the case then of course I could buy/build a single 'official' USB download cable, and use that for all devices (albeit jsut for progrmaming).

Or perhaps, could one write a small VB/windows application that 'calls' openOCD, essentially meaning I could just program a simple front-end for it, letting it handle the command lines, form tick boxes and drop down menus in the GUI.

I have looked into the Amontec JTAG key and JTAGkey-tiny, and whilst that seems a very cost effective solution (the tiny is 29EURO's), their software is again, confusing.

I know I have mentioned 'what I want' several times, but just to reitterate...ideally something like IC-prog, but for CPLD's/PFGA's. No extra functionality, purely to successfully program devices. A nice stand-alone bit of kit.

Any idea's? Or have you all heard these questions too many times before? Smile

Hope someone can help.

Buriedcode.
Back to top
FvM



Joined: 22 Jan 2008
Posts: 5151
Helped: 766
Location: Bochum, Germany


Post08 Feb 2009 16:28   

svf player lattice with xilinx usb


A few comments.

CPLD programming through SVF-files is supposed to be portable between different programming hardware, generally. But not all vendor specific programming tools support SVF standard, Altera e. g. uses JAM STAPL files for similar purposes. So additional conversion steps may be necessary. Most tools provide a way to access user devices in mixed JTAG chains, including some kind of programming support. Thus it should be feasible to program multi vendor CPLD and JTAG accessible processors through one programming adapter and vendor tool.

It's obvious however, that most designers don't utilize this option and have separate JTAG interfaces for each vendor and and possibly each individual PLD.

If we also consider JTAG debugging, there's most likely no other option, than using vendor specific adapters and tools. Cause each vendor has a different JTAG connector pin mapping, usually, this may be already a plausible reason to use individual JTAG interfaces.

Regarding PC-side hardware connections, a simple professional solution is a computer that provides suitable classical interfaces. If you own a Fujitsu Siemens Lifebook E, you'll rate this USB-to-LPT discussions at best interesting. PC-Card true LPT adapters are also available, B.T.W., and cheaper than a special USB-to-LPT adapter.

As pointed out in other discussions, some USB LPT interfaces have an option for low level pin control, that may be utilized by a true LPT emulation driver. As all accesses go through hardware virtualization in a protected mode driver, they are considerably slower than with a real hardware adapter. However, LPT programming adapters are operated rather slowly anyway, so the overhead may be tolerable.
Back to top
Buriedcode



Joined: 06 May 2004
Posts: 327
Helped: 34
Location: London


Post08 Feb 2009 19:58   

stapl svf converter


FvM wrote:

CPLD programming through SVF-files is supposed to be portable between different programming hardware, generally. But not all vendor specific programming tools support SVF standard, Altera e. g. uses JAM STAPL files for similar purposes. So additional conversion steps may be necessary.


Agreed. I have checked XIlinx and Lattice software for generation of SVF files, as well as go through each file to check exactly what SVF commands each uses. Thankfully, both seem to abide by the basic standard, creating very similar looking SVF's. If, and I stress *IF*, I was to write my own host software, or use an opesource version, I am confident I could write a small script to remove/bypass any SVF commands that aren't needed, or appear to be wildly differetn from vendor to vendor. Altera also appear to support this file output:
http://www.altera.com/support/kdb/solutions/rd07222008_677.html



FvM wrote:

Most tools provide a way to access user devices in mixed JTAG chains, including some kind of programming support. Thus it should be feasible to program multi vendor CPLD and JTAG accessible processors through one programming adapter and vendor tool.


Although this would be biased towards one particular vendor, it is an ideal solution.
Whether I clone a proprietary download cable or buy one, only one would be needed. And with good software support should make life relatively easy.

FvM wrote:

It's obvious however, that most designers don't utilize this option and have separate JTAG interfaces for each vendor and and possibly each individual PLD.


Whilst being a great point, whether I buy, or build, I have no problems with building a simple adapter cable that changes the input (from programmer) pinout, to the vendors pinout. I have stupidly used my own custom pinout for lattice devices anyway (2x3, not 1x8, or 2x5), so this would need to be done whatever method I choose.

FvM wrote:

Regarding PC-side hardware connections, a simple professional solution is a computer that provides suitable classical interfaces. If you own a Fujitsu Siemens Lifebook E, you'll rate this USB-to-LPT discussions at best interesting. PC-Card true LPT adapters are also available, B.T.W., and cheaper than a special USB-to-LPT adapter.


Agreed. Obviously, the simplest solution would be to use an LPT card, be it PCI for desktops or PCIMA cards for laptops. Unless I purchase a new computer, both options are out for me (no spare PCI slot!!), even though I already own a nice cheap LPT PCI card that worked beautifully with all parallel port dongles.

About the USB2LPT adapter. If it did happen to behave exactly like a true host LPT port, then I would not have this problem Very Happy I undersatnd it is incredibly difficult to implement a true 'direct I/O access' system via USB, not only slowing it down, but because of this lack of speed, also perhaps not working with specific dongles at ALL. The price of that guys website is reasonable, and even if it doesn't work, might prove to be a nice cheap FX-2 development board for me.

Oh and about debugging. For now at least, I have no interest in using any USB-JTAG system for debugging of any kind. You are correct in saying that 'vendor specific' cables are the onyl real way. Altohugh openOCD would work, as that is what it is designed for, I do not have any debugging enviroment software on my PC for it to be integrated in. If I start to use this function, I will of course look into this further.

Whilst I post in various forums, and send 'pinger' emails to people, I tihnk I will start attempting to write my own software to see if I can get a nice simple SVF player to work. With free hardware design.

Thankyou!

Buriedcode.
Back to top
eltonjohn



Joined: 22 Feb 2002
Posts: 1751
Helped: 28


Post09 Feb 2009 23:01   

lattice usb download cable clone


Well yes this topic is an obligatory one with so many stupid jtag cables and the lack of any stardard .Having a laptop as a workhorse. I thought about buying all of the above .Then finnally i found a much better solution and is pcmcia to PCI box extensions .The only problem is that they are kinda pricy .$1000.
http://sewelldirect.com/pcmcia-to-pci-1-slot.asp
But doing some careful ebay hunting i bought this solution for $150
another thread about USB cables for CPLD's/FPGA
The great thing is that i can use a parallel port ,a XDS560 emulator ,and even an external VGA board with my laptop .So good bye all those expensive usb solutions.
Back to top
Buriedcode



Joined: 06 May 2004
Posts: 327
Helped: 34
Location: London


Post10 Feb 2009 2:25   

fx2 usb open source


Elton, thanks for adding to the thread Smile

It really is a sore point isn't it? Although, As I said in my first post..if I was using these devices in a professional manner, on a medium/large scale, I would have bitten the bullet and sacrificed my PCI soundcard for a LPT one. As well as purchased an overly expensive USB JTAG system for my laptop.

The device you are talking about seems like a great idea, not just for parallel ports/JTAG, but also for pretty much anything Very Happy My laptop is old, but not old enough to still ahve a LPT port. Its PCIMA slot is taken up by a wifi card, but I won't need that when in the field updating designs/firmware.

So, some progress.

I have just ordered one of these:
http://www-user.tu-chemnitz.de/~heha/bastelecke/Rund%20um%20den%20PC/USB2LPT/ul-17.htm.en

Although I do not believe it will be nearly as quick for most parallel port download cables, I bought it out of interest. When I have recieved it I shall post (as well as email the designer) a list of JTAG software/programmers it works with. He says on his site that 'ispVM system' from lattice works. And that software can accept multiple input files (SVF, STAPL etc..). I can only hope it is equally as effective with xilnx and altera software (but I am not holding my breath).

For a more permenant/eligant solution, after spending 5 hours googling and making notes, I think I shall attempt to use the FT2232, and write my own software in VB.NET. The FDTI's website is extremely useful for anyone wanting to write software to interface with their parts. Their description of the JTAG DLL file used for the FT2232 also gave me a very good idea of a program structure. This means, if (again IF) all goes well, I could attempt to design another, cheaper, easier hardware interface to use with the program. Perhaps an Atmega8-based low speed USB app.

Depending on how it goes I may share this, as a brutally simple 3rd party programming system. No frills, no extra software to install, just a small app, where you plug in the hardware, load in your SVF (or perhaps STAPL) file, and program. I am building up BSDL libraries as I go as well, so that the host software can at least attempt to identify the manufacturer and part number of a device on the chain. So far these are mainly the parts I use:

lattice MACH4A series
Lattice MACHXO
Altera EPM70**
Altera EPM1270 (maxII device)
Xilinx 9572/144/36 (plus their XL equivilents).

Perhaps a parser, which can read a BSDL file and add the information is contains into a library for the host software. Even better would be a batch system, that scans a folder and adds all devices for which there are BSDL files.

Without getting too ahead of myself here, there *may* be a possibility of configuring the FT2232 device as an Altera USB blaster as well. Although this may seem a bit OTT, it may be possible. (plus it adds evetra functionality, making it Beter for Altera devices).

Well theres an idea. Even if I can't do and it all goes south, I shall try to post a list of methods/workarounds to be able to configure xilinx, lattice AND altera devices with one 'box' via USB - For all you modern laptop users. Even if this involves a crude USB -LPT port, with a small CPLD to change the connections for different vendor parallel port cables (think amontec chameleon...but with USB).

I sincerely hope anyone interested in willing to help with the process will post in this thread. Although ideally I'm jsut after solving my own problem, it would be nice if we could create a cheap and simple replacement for educational/hobby purposes. Where cost, simplicity are paramount, and speed/debugging capability are second.

BuriedCode.
Back to top
FvM



Joined: 22 Jan 2008
Posts: 5151
Helped: 766
Location: Bochum, Germany


Post10 Feb 2009 7:55   

svf fpga


FTDI would be also my choice for a native JTAG adapter. But it can't work as an USB Blaster without additional hardware (a CPLD). And it seems to be complicated to make a FT2232 recognized as FT245/USB Blaster due to different EEPROM organization, at least when using the FTDI Mprog tool.
Back to top
Google
AdSense
Google Adsense




Post10 Feb 2009 7:55   

Ads




Back to top
Buriedcode



Joined: 06 May 2004
Posts: 327
Helped: 34
Location: London


Post10 Feb 2009 14:14   

xds560 diy


FvM,

Good point! I was *hoping* the 2232 could be used as a pseudo FT245 type thing, but of course its a different device, with different commands and extra features, so I guess you're correct. The addition of a CPLD (for my own purposes) was not a problem, as I have oodles of EPM7064's, but for a open 'DIY' type afair, more chips is just a hassle (plus it would need to be configured, more hassle).

I know I'm taking this too far, as I could just buy a cheap USB altera clone from ebay, or knock one up myself with the information provided here in a another thread. The altera software can convert generic SVF (from other vendors) to JAM/STAPL for which the USB blaster can be used directly with their software. In effect, I'm pretty sure one could get away with just having an altera USB blaster as a generic CPLD programmer, for which only Altera chips have higher function support.

But ...... that would take the fun out of attempting to design my own generic system! Free from the tyrany of proprietary cables/hardware. Saying that, I tihnk I'll still knock up a USB blaster prototype, as I have most of the parts laying around here.

I have collected a large number of bookmarks, and it seems there are MANY wonderfully designed FT2232 'dongles', the vast majority of which are pretty much identical, only the pinout of the 'JTAG' connector is changed (most used for ARM debugging with openOCD) and the voltage buffering. This makes life much easier for everyone else, as they are not restricted to a specific design, nor software.

Perhaps I have missed something in all my research, but you would ahve thought others would have written an 'SVF player' for both windows, and linux, with a nice GUI and made it open source? I know amontec have their own one (can't test it, dont' own a JTAGkey) which appears to be command line...it would be trivial for them to add a simple GUI to that. I would email them to suggest support for third party 'generic' hardware, but I don't think that would do their business any good Smile To be fair to the guy from Amontec, his name crops up in MANY forums about JTAG, not only talking about his products but also providing very useful information for us designers.

Gotta stop these long posts....

Scott.
Back to top
Buriedcode



Joined: 06 May 2004
Posts: 327
Helped: 34
Location: London


Post24 Feb 2009 6:39   

diy cpld programming


Hi again,

Well I have been collecting some info about this, everything from controlling a TAP controller in a small micro, all the way to looking into writing routines in VB.NET (theres already plenty of stuff for you linux peeps).

I am now confident a very basic setup can be achieved. For the prototype, speed will not be a main concern, that can be optimised later. Ultimately the software should do the following:

Be able to load in a generic SVF file, check for errors, and generate a list of commands.
Scan the chain for devices, and their repective ID code's, comparing hex result with built-in library. Library can be updated via parsing BSDL files available from all CPLD vendor sites.
Successfuly packet up comands for FT2232, and store read-back information.
Compare read back info with expected TDO patterns (along with their masks).
Report the following errors: SVF syntax, SVF unknown command, device not present, verify error at XX (only reports first ten errors).

As the FTJTAG.DLL is nice and generic, without too much direct FT2232 information, it sohuld also be possible to add functionality for 3rd party hardware, I am also working on a AVR-USB low-speed dongle, using the atmega88. Although low speed, because we have direct acccess to I/O's, and some intelligence in the dongle, it could be optimised to achieve a fairly decent configuration time. not only that, but being opensource, and only using a generic micro, it would be simple AND cheap. Possibly using the already existing USBasp hardware.

Again, I must confess I am NOT a seasoned programmer. I have only ever written a few basic VB6 and C utilities, much more of a PIC/AVR coder here. But due to the lack of software specifically for configuring CPLDs/FPGA's independant of manufacturer, it seems necessary. No compiling, no command lines, no addition modules to be downloaded. Purely using any FT2232 JTAG dongle, or compliant device, and install the software. Then one should be able to use their host software to create an SVF file (of which all vendors I've checked do), load it into the software, and blammo. Job done.

Don't expect this to be ready in a few days. I first have to learn programming lol

BuriedCode.
Back to top
Buriedcode



Joined: 06 May 2004
Posts: 327
Helped: 34
Location: London


Post13 May 2009 18:31   

visualbasic usb2lpt


Right, an update Smile

I have managed to wirte some simple software to get the IDcode from a jtag device, using the ft2232. woot. Nothing special, but as I have never written high level software before, its working.

I'm looking for any C/VB code for communicating with the ft2232 in JTAG mode. I have all the FTDI examples but they aren't that helpful with regard to 'command queuing'

Any help would be appreciated, the bigtgest hurdle will be writing an SVF interpreter :/

BuriedCode.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design -> another thread about USB cables for CPLD's/FPGA
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
FPGA Architectures,CPLD's (3)
Schematic of programming cables for FPGA.. (1)
USB cables (4)
Any the infomation about configuration of FPGA via USB? (2)
system thread vs user thread (1)
Another FPGA and ASIC course (6)
Help!! About RS232 modem cables.... (1)
USB source driver for FPGA device (2)
FPGA programmer for Spartan family (USB) (2)
Data Transfer Through USB cable from one PC to another (5)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS