Beginners CPLD

Topics relating to PALs, CPLDs, FPGAs, and other PLDs used for the support or creation of 65-family processors, both hardware and HDL.

Best for beginners?

XC9536
6
50%
EPM7064
2
17%
Other
4
33%
 
Total votes: 12

User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Post by 8BIT »

Dajgoro wrote:
Well, i bought four XC9536, and sockets. I also managed to install ISE, now i just need to figure out how to transfer the program to the cpld using the lpt port...
I wrote a detailed instruction for that for someone else. I'll see if I can find it and post it. Basically, after you compile the logic, you open the impact tool inside of ISE and it will send the programming to the parallel port through the progamming adapter, and to the CPLD.

Daryl
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Post by 8BIT »

Found it. Here it is:

Code: Select all

Some notes first.
You DO need to power the target board from your own supply.  The JTAG Gnd and Vdd pins are used to power the IC in the adapter, not to power your target board from the parallel port

Also, you should be able to use impact, as that's what I do, as long as you have a parallel-3 compatible cable.

You may want to double check the schematic of your JTAG header to ensure its functions line up correctly.

My pinout from the programming adapter is as follows:

1 +5v from target board
2 gnd
3 tclk
4 tdo
5 tdi
6 tms


Here are the steps I use:

1) compile the source to generate the JED file.

2) open the impact under the generate Programming file tab of the ISE - > Configure Device

3) select configure device using boundry scan (JTAG) - click finish

4) if the programmer is powered and the XC95xxx connected, you should get a simple schematic showing TDI, the XC95xxx, and TDO.

   if not, then it will report trouble.  not powering the target board will also land you here.

5) right click on the xc95xxx, and select program

6) it may ask you to verify the JED file, and ensure "erase device before programing" is selected

7) should take about 20-30 seconds total to erase, program, and verify.

Hope that helps once you get the logic written and the programmer build.

Daryl
Last edited by 8BIT on Sat Dec 03, 2011 5:07 am, edited 3 times in total.
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Post by Dajgoro »

Thanks, now have to build the programmer, and wait for the cpld to arrive...
This topic might be seen as a small cpld tutorial for beginners.
Nightmaretony
In Memoriam
Posts: 618
Joined: 27 Jun 2003
Location: Meadowbrook
Contact:

Post by Nightmaretony »

A little bit of a worry, am going to use a Xilinx XC95108 for the pinball mind gating logic. Digikey lists all j wing versions as non stock. Trying to avoid SMD, period. this chip is easily still available though and doesn't seem to go EOL? If it is headed towards oblivion, what through hole 5 volt alternatives are recommended?

also, some low level tutorials linked would be sweet, going to be the first time using CPLDs :)
"My biggest dream in life? Building black plywood Habitrails"
ElEctric_EyE
Posts: 3260
Joined: 02 Mar 2009
Location: OH, USA

Post by ElEctric_EyE »

All Xilinx 5V CPLDs are EOL.

Their 5V input tolerant FPGAs went first, but Spartan 2 is still being produced IIRC, although you will be forced to use ISE 10.1 or earlier for development.

I would recommend, if you are using 5V CMOS for input circuits, 3.3V Xilinx CPLD/FPGA switching levels may be sufficient. For 5V CMOS/TTL output circuits, you will need a 5V input tolerant CPLD/FPGA, i.e. Coolrunner II XPLA3/Spartan 2 respectively. I think they're the only ones left!

Good luck! And if you really want to aim for the future aim low, as in volts...
Nightmaretony
In Memoriam
Posts: 618
Joined: 27 Jun 2003
Location: Meadowbrook
Contact:

Post by Nightmaretony »

bleah. Already laying out the board for the XC9500 series. Am putting pins all around to create an adapter board. Sigh. trying to make the entire circuit 5 volts and keep it that way :(

can use a coolrunner I guess on an adapter board and keep using what stock I can find of the xc9500 series.

thanks!
"My biggest dream in life? Building black plywood Habitrails"
ElEctric_EyE
Posts: 3260
Joined: 02 Mar 2009
Location: OH, USA

Post by ElEctric_EyE »

Nightmaretony wrote:
...Sigh. trying to make the entire circuit 5 volts and keep it that way :(...
What is so important for 5V operation in your circuit?
Nightmaretony
In Memoriam
Posts: 618
Joined: 27 Jun 2003
Location: Meadowbrook
Contact:

Post by Nightmaretony »

The eproms and rams are 5 volts and it runs a 5 volt piggyback to a pinball machine. it uses what I nickname as forever technology as you can find certain chips while others die. I also have literally thousands of eproms new I can use for this project. UYnless there is an easy and cheap way to 2 way buffer down to 3 volts and rebuffer back to 5 volts, as the board breakout runs through 74hc245 buffer chips.

http://www.nightmarepark.com/6502.php?d ... ll%20Mind/

look at the schematic and the 3D of the board.

But basically, a Coolrunner ][ would run 5 volt logic? I can deal with it being SMD, I set up headers to break out all the signals to a sub board if the cpld went EOL, which it did.



[EDIT] While Digikey lists the XC series as nonstock it IS available though. Still glad for the design decision to put breakouts for a sub board unto that day.....have a board with level shifters and all, ti should work out...
"My biggest dream in life? Building black plywood Habitrails"
ElEctric_EyE
Posts: 3260
Joined: 02 Mar 2009
Location: OH, USA

Post by ElEctric_EyE »

Nightmaretony wrote:
But basically, a Coolrunner ][ would run 5 volt logic?
The only Coolrunner II that are 5V input tolerant I am aware of are the XPLA3 Family. If you see the XL suffix on a Coolrunner II device it is strictly 3.3V.
Sorry for the bad news.
Nightmaretony
In Memoriam
Posts: 618
Joined: 27 Jun 2003
Location: Meadowbrook
Contact:

Post by Nightmaretony »

No worry. am sticking to the original plan for now, use the older XC series and design a sub board when I can't get them anymore....

http://www.nightmarepark.com/6502/Pinba ... d%203D.jpg

the square of headers around the CPLD would go up to a new CPLD sub board when required...
"My biggest dream in life? Building black plywood Habitrails"
Karatorian
Posts: 17
Joined: 13 Mar 2011
Location: Rindge NH USA
Contact:

Post by Karatorian »

I'm a beginner interested in CPLDs as well and was wondering who's tools have the best Linux support. Any un*x users care to comment?
@loop: lda (src),y — sta (dst),y — iny — bne @loop — inc src+1 — inc dst+1 — dex — bne @loop
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Post by BigEd »

Can't speak of the other choices, but Xilinx tools work well on linux.

Only one caveat: if you're using a Xilinx USB-jtag adapter you may need to run a 2.6 kernel, such as can be found with a Fedora or a Redhat-style distribution. I tried the other day to get this working on an Ubuntu distribution with a 3.0 kernel and didn't succeed. (It might be possible though.)

There's no such limitation with a parallel-port adapter, but note: if you're using a parallel-port-jtag adapter, you need a computer with a parallel port. The USB-printer-port converters are not suitable for jtag.

Cheers
Ed
User avatar
Arlet
Posts: 2353
Joined: 16 Nov 2010
Location: Gouda, The Netherlands
Contact:

Post by Arlet »

I am using Ubuntu 10.04 LTS (2.6.32 kernel), and I've got both the Xilinx Platform Cable USB II working, as well as the cheaper digilent USB cable. The Xilinx cable works seamlessly with the ISE software.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Post by BigEd »

Good point - I've got an Ubuntu 10.10 here which is on a 2.6 kernel. But my usual machine has moved forward just a step too far.
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Re: Beginners CPLD

Post by Dajgoro »

As of my recent progress int he Minimalistic CPU topic, and since i got my LPT JTAG from ebay, i decided to wire up a XC9536 that is is supposed to control stuff around my sbc. So i soldered it, connected the jtag, and power. Then i went into ISE (13.3) and i took a AND gate and placed 2 inputs and 1 output, named it AIN1, AIN2, AOUT1. I took the datasheet, looked at the pins, and figure out that i like the pins 2, 4, 6, and that meant D6, C6, B6. I typed that into the ucf file, and hit that green button. And i got errors saying: (signal) is assigned to an invalid location ('(pin)') for this device. This will prevent the design from fitting on the current Device. (signal) must be reassigned before attempting a re-fit.
Then i started Pace, and he offered me only two pins FB1 and FB2, so i took them, but the error kept appearing. Then i ran an example using the xc9572, and that worked fine, the i switched it to XC9532XL, and it worked again, but when i selected the xc9536, i got the error again. Impact won't even open in this small project of mine, and when i open it using other projects, i get only errors, and red text. I tried googling, but that didn't go far... What i am doing wrong?
Post Reply