CPLD programming...how can I get started

RU482

Lifer
Apr 9, 2000
12,689
3
81
I need to build a device that will test out 40pin ribbon cables, essentially the same as 2 connector ATA33 cables. I have figured out a method using a bunch of AND, NAND & or XOR gates, but laying out the circuit on a PCB is turning out to be hell. I have a supply of Xilinx 9500 series (9572, 44 pin PLCC) that are part of the product we build. I don't have any experience programming CPLD's or any kind of PIC or EEPROMS. I do have some C knowledge.

What I would like to know is, what resources can I tap in to to learn how to write code for CPLD's?

Any advice??
 

FrankSchwab

Senior member
Nov 8, 2002
218
0
0
Well, I can't answer your question directly. I'd look at the major manufacturers websites - for example, Xilinx will sell you this development kit for $45. Other manufacturers will have similar kinds of kits.

However, if you find yourself a copy of the July or August edition of "Circuit Cellar" magazine, an article describes exactly the kind of device you're trying to build, with a different approach.


Good luck,

/frank
 

blahblah99

Platinum Member
Oct 10, 2000
2,689
0
0
I don't know how to answer your question regarding testing ribbon cables either, but you will need to know vhdl. There are tons of info on the web on that. As for programming an actual cpld, you will need to learn how to use Xilinx's development software (for example) to synthesize the code into actual gates and pins.
 

Lynx516

Senior member
Apr 20, 2003
272
0
0
Yup you will need to learn VHDL or Verilog. Both arnt that hard if you have experience of other programming languages. I would recomend Verilog as a few VHDL compilers I have used have been horriffically buggy
 

AbsolutDealage

Platinum Member
Dec 20, 2002
2,675
0
0
Originally posted by: Lynx516
Yup you will need to learn VHDL or Verilog. Both arnt that hard if you have experience of other programming languages. I would recomend Verilog as a few VHDL compilers I have used have been horriffically buggy

Bah... VHDL > Verilog
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Originally posted by: AbsolutDealage
Originally posted by: Lynx516
Yup you will need to learn VHDL or Verilog. Both arnt that hard if you have experience of other programming languages. I would recomend Verilog as a few VHDL compilers I have used have been horriffically buggy

Bah... VHDL > Verilog

Bah... Verilog > VHDL
 

ElDonAntonio

Senior member
Aug 4, 2001
967
0
0
Well if you don't have that many gates (and I guess you don't, if you can lay out manually the circuit), you can just buy a few gates at your Radio Shack and place them on a testing board. You'll need some wire too and a tool to cut it (damn it I can't find any words I'm looking for in english tonight, just came back from the club and I'm half drunk), and you can build your circuit yourself without any PCB or CPLD.

 

dszd0g

Golden Member
Jun 14, 2000
1,226
0
0

I assume by PCB you started off with a wire wrap design? Unless you plan on building more than a couple of them a wire wrap board with 74HC chips on it should be fine for testing a cable. If you have more than 50 gates, you probably are past the point of a wire-wrap board.

I work more on the FPGA side of things, but I believe the information I am providing should be accurate for the CPLD side.

Verilog is pretty easy to learn and there are many tutorials online. VHDL was designed by the military and is pretty messy IMO and more complicated than it needs to be, but there are some things that can be done in VHDL that become quite difficult with Verilog. Both are popular. I assume you have some knowledge of logic design to come up with the gate logic.

If you already have the logic using gates, you don't necessarily need to learn either of the above. Xilinx's Foundation (older) and ISE (newer) both allow you to build a schematic with the gates. Verilog and VHDL are much easier to work with on a large project, but if you want to stick with gates you can.

So you have XC9572-?PC44C? The ? is going to be either 7, 10, or 15 and is the speed rating. The XC9572 has about 1600 usable gates.

If you are testing 40 pins with a 44 pin chip (probably about 30 of which will be usable) you probably will need at least 2 CPLDs on the board to test all the pins. You will still need to put the CPLDs onto a board.

You can start off my downloading Xilinx ISE Webpack (a crippled version) and seeing if that is what you are looking for. The Coolrunner II design kit for $50 that was mentioned uses an XC2C256-7TQ144. Xilinx's main Web page and support site (free membership) has a ton of information that can get you started. If you have a Xilinx sales rep, I am sure they would be happy to point you in the right direction.
 

KalTorak

Member
Jun 5, 2001
55
0
0
I happen to be using the smallest Xilinx CPLD there is to integrate some glue logic into a motherboard design I'm working on. Programming it is very very simple. We wrote our code in VHDL, but there may well be GUI tools to put the schematic into the CPLD. Xilinx gives away the programming software (it's that webpack, you can download it from their website), and charges a nominal fee for the programming cable (their business is selling chips, not support).

I haven't worked with Altera's stuff since my last year in school, but I do recall they've got GUI tools to draw schematics for their parts. I expect the model's about the same.