Dangerous Prototypes

Other projects => Past projects => CPLD programmable logic => Topic started by: ddsdavey on October 04, 2011, 02:12:41 pm

Title: Coolrunner beginner,programming???
Post by: ddsdavey on October 04, 2011, 02:12:41 pm
Hi guys,just started a course and have got myself a Coolrunner 2 and seperately i have purchased a "parallel 3" programmer.
Ok like i said im a beginner so you have been warned lol!
This is a picture of what i have.Obviously theres a coolrunner 2 pictured and a 20 pin  but the rest came with the parallel programmer and i have no idea how i am meant to connect it to the necessaery points on the board? What are the female to female flex breadboard cables for? The board has no header pins,just the 6 holes for vcc etc whilst the programmer has 10 pin ribbon.
Whats the easiest way i can connect all this together,i feel i must be missing something,maybe that solders to the coolrunners 6 points to make it able to accept the plug?
I have no instructions so i really could do with some help if you guys are willing to humour an idiot for a minute!

Sorry,as a new member it states i cannot post pictures so i dont know how i can get help?!,if the mods could host the image i would appreciate it. Its merely ap picture of the parts i received which i then uploaded to imageshack.
Again im sorry for my noobnes!
Title: Re: Coolrunner beginner,programming???
Post by: ian on October 04, 2011, 07:02:54 pm
Hi,

I'll try to write something fairly detailed ASAP, but I need to check out the parallel3, never worked with it.
Title: Re: Coolrunner beginner,programming???
Post by: ddsdavey on October 04, 2011, 07:29:20 pm
Thanks Ian that would be really kind of you,i realise what i am asking is way down there in the tedious for most of you lol but i appreciate your patience,its really hard to bridge the gap between complete caveman and competent human,with not even knowing how to attach the parallel 3 programmer to the board etc!
Its hard being a beginner of the site also as any outside url is assumed to be spam,im sure you have your reasons but is there no way for me to post my images.
Title: Re: Coolrunner beginner,programming???
Post by: ddsdavey on October 04, 2011, 08:46:51 pm
Ok perhaps this might make things a little clearer,my parallel 3 programmer has a 2.54mm DC3-10 PIN Male yet the coolrunner boards programming points equal 6?  I now figure that i connect the 2 with female flex cable but 10 does not go into 6 so which pins get the 6 points.
I did warn you i new!
Title: Re: Coolrunner beginner,programming???
Post by: ian on October 06, 2011, 02:06:30 pm
Hi ddsdavey,

Can upload pictures directly to the forum. In the post reply view click the attachments tab at the bottom.

The filter won't let you post links until you are 1 day old + 1 post, you should be out of the woods now. I'm sorry about the annoyance.

I checked out the parallel cable III, is it like the attached image?

In this guide, starting page 22, there are some details about CPLD programming:
http://www.xilinx.com/support/sw_manual ... uguide.pdf (http://www.xilinx.com/support/sw_manuals/2_1i/download/huguide.pdf)

This programmer works from within the ISE Webpack development environment (4GB download), grab it and install it. You'll need to get a free license file:
http://www.xilinx.com/products/design-t ... ebpack.htm (http://www.xilinx.com/products/design-tools/ise-design-suite/ise-webpack.htm)

To connect the programmer to the CPLD, follow this guide:
[attachment=1]
Cable-----CPLD
VCC----VTG
GND---GND
TCK---TCK
TDO--TDO
TDI--TDI
TMS--TMS

Since the programmer does not power the board, you will need to prove a 5volt supply to the V+ pin of the development board -or- +3.3volts to the 3V3 pin.

I have never used this cable, or programmed from within ISE. My best guess if that you need to go to the IMPACT program, load the SVF or XSVF firmware, set the Parallel Cable III as your programmer, and then program the CPLD. It's something like this, but to the programmer instead of writing to a file:
http://dangerousprototypes.com/docs/Exp ... SE_Webpack (http://dangerousprototypes.com/docs/Export_%28X%29SVF_from_Xilinx_ISE_Webpack)

Are you planning to do development? This is a huge amount of work and challenges for a beginner to just load a SVF image. The Bus Pirate would be WAY easier, and the Bus Blaster would be much easier.
Title: Re: Coolrunner beginner,programming???
Post by: ddsdavey on October 06, 2011, 07:13:35 pm
Thanks for the help guys,its been alot of use.
Title: Re: Coolrunner beginner,programming???
Post by: ddsdavey on October 06, 2011, 09:49:50 pm
The thing im most stuck on is connecting the 6 jtag points to the parallel 3? The parallel 3 i have has a 2.54mm DC3-10PIN on the end.I connect the 6 jtag points on the coolrunner via flexi wire to there corresponding points on the paralell 3s 2.54mm DC3-10PIN using this image...
①TCK ②GND
③TDO ④VCC
⑤TMS ⑥NC
⑦NC ⑧NC
⑨TDI ⑩GND
and obviously im left with 4 unused pins from the 2.54mm DC3-10PIN
It breaks my bloody heart because virtually every other design available from various ebay sellers has just 6 wires or 6 points,so why do i get lumbered with 10 pins!
Im positive i have wired the power up correct so im thinking its a noob thing?
Am i missing something because Impact only sees the parallel 3 and not the device attached.
HELP!!!
Title: Re: Coolrunner beginner,programming???
Post by: ian on October 07, 2011, 10:06:32 am
You don't need all the pins. Some are for other devices.

From impact you should be able to do a chain scan maybe. You also have to do some stuff with setting up a device chain. I'm sorry, I don't know any more than that about it. We use our own tools to program the chip, and it isn't this difficult.
Title: Re: Coolrunner beginner,programming???
Post by: somun on October 15, 2011, 08:14:30 am
The fact that the programmer has a 10 pin header might imply that it is actually an Altera programmer instead of Xilinx. In that it is possible that you might have to build/purchase another one. Can you share some link of where you bought it from?
Title: Re: Coolrunner beginner,programming???
Post by: SKIPPER on November 11, 2011, 09:07:26 pm
Since XILINX's Parallel Cable III (DLC 5) takes 5V power supply to operate and 9536XL is a 3,3V device, will they work together ?
Can JTAG interface at 9536XL device work with 5V programmer's connections that use 74HC125 chip and PC LPT connector (both @ 5V) ?
Title: Re: Coolrunner beginner,programming???
Post by: ian on November 14, 2011, 12:38:39 pm
95xxXL family has 5volt tolerant pins, so I assume it would work no matter what. Never tested though.
Title: Re: Coolrunner beginner,programming???
Post by: SKIPPER on November 15, 2011, 04:55:22 pm
[quote author="ian"]95xxXL family has 5volt tolerant pins[/quote]

This probably mean that one can apply 3.3V or 5V to INPUT pins, but OUTPUT pins are 3.3V and could not properly drive TTL levels.
Parallel Cable Programmer communicates both ways, so I guess it will not work properly.

Attached is schematics of parallel cable programmer found in Xilinx's docs.

Does anyone know to improve it, to reliably interface to 9500XL family of devices ?
Title: Re: Coolrunner beginner,programming???
Post by: ian on November 16, 2011, 01:35:41 pm
I see, because of the HC logic... There is only 1 CPLD->PC pin, so maybe you could use a pullup to 5volts. No idea if that will work, might be too slow.
Title: Re: Coolrunner beginner,programming???
Post by: JimNarem on February 20, 2012, 09:21:37 am
Kinda old thread, but I'll kick in some ideas anyway.

I just took apart my DLC5, and it uses a motorola MC74HC125A.  Digging into the datasheets and you'll find that
this chip only allows input at Vcc+0.5V max.  So if you power the DLC5 from 3.3V, the inputs from the parallel
port are too high.  Turns out that there are a LOT of different 74125 chips in various families out there.
A good reference is from TI:  http://www.ti.com/litv/pdf/scea035a (http://www.ti.com/litv/pdf/scea035a) about level translation.  One possibility
is the 74LV125A where Vcc is 2v-5v and inputs from -.5 upto 7v.

But that moves the problem to the parallel port end.  It uses TTL levels, and from the same TI ap note, min
Vin-hi for 5v-TTL is 2.0V and min Vout-hi for 3.3V-TTL is 2.4V.  This means that the PC parallel port should
see the right logic levels as long as the slew rate of the driver gets the output level above 2.0V fast enough
for the JTAG data rate.  Slew for the 74LV125A is 100ns/V.  So lets say 1 MHz, but 2 MHz might work (remember
you have to slew both ways and have bit valid time too).

So my theory (awaiting a digikey order) is that replacing the exiting buffer chips in the DLC5 with the 74LV125A
should allow it to work with the coolrunner-ii and FPGAs that JTAG at 3.3V (CR-II jtag max is 4.0V, that's why
xilinx says you can't use it for the cr-ii:  http://www.xilinx.com/support/answers/3596.htm (http://www.xilinx.com/support/answers/3596.htm)) when the
DLC5 is powered from 3.3V.


I had always thought of the 74HC125 as an OK 5v-3.3v buffer (it's listed that way on the adafruit partfinder)
but it turns out you have to pick the right one or you violate it's datasheet specs.
Title: Re: Coolrunner beginner,programming???
Post by: hlipka on February 20, 2012, 10:59:31 am
[quote author="SKIPPER"]This probably mean that one can apply 3.3V or 5V to INPUT pins, but OUTPUT pins are 3.3V and could not properly drive TTL levels.
[/quote]
3.3V are enough for TTL high level (which is specified as 2.0V). But one cannot drive the DLC5 with 5 volts and connect a 3.3V CPLD to it, since the HC125 is not TTL-compatible (H level is specified as 70% Vcc, which is then 3.5V). In that case, one would need to use a HCT125.
Actually, I want to build up a DLC5 this week. I will check with both HC125 and HCT125, to see what happens (I think I have a HCT laying around). But the iMPACT user guide explicitly states that the DLC5 cable works with 3.3V devices, and it is powered by the device. So I guess it's safe to drive it that way.
Title: Re: Coolrunner beginner,programming???
Post by: hlipka on March 07, 2012, 09:31:44 am
OK so I got finally around to build the DLC5 cable, and tested it yesterday. I used the XC9572 breakout board, with a 5 volt power supply. The cable is then powered by the 3.3 volt regulator of the board. Everything worked fine. I tested with OpenOCD, xc3sprog and iMPACT. I will write up a more detailed guide later on.
Unfortunately I didn't have a HCT125 ready, so I couldn't test it. But since the HC125 works fine, the HCT125 should too. One thing which I think is important is to use schottky diodes for building the cable, not normal ones. Otherwise both Vcc for the cable, and the signal levels on the parallel board might be too low.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01182132656session_write_close ( )...(null):0
20.01212264248ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01212265024Database_MySQL->query( ).../DatabaseHandler.php:119
40.05742403760Database_MySQL->error( ).../Db-mysql.class.php:273