UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer traymond
Observer
5,432 Views
Registered: ‎02-12-2016

eventually developing on CPLD

Hi Im Terry Raymond im in the United Sates in Wyoming and very new to FPGA and VHDL code.

I eventually want to develop for CPLD would the basics in the courses cover this etc?

 

Im interested in approximating the older obsolete MOS chips, but first I will try the minimal course to gain a better understanding of

VHDL code so I will try out the minimal FPGA course listed but they dont even mention CPLD, and that too is my lack of inexperience Im really sure of.  :)

 

I tried out a certain FPGA software but it really overwhelmed me and intimidated me, but made me see I need to learn more of the

VHDL language and code.  I found www.nandland.com  which deals with the mere basics of gates, so is that what the Minimal course offers plus learning to code?

 

I found one older book on VHDL from back in 2005 so maybe that might help too along with the minimal course.

 

I was just wondering though how hard CPLD really is, learning how to simulate is a tool CPLD uses, does that simulate how like an older MOS chip would function or act?

 

Is it true DATA sheets only show the outer covering of a chip not the Core?  How can one figure out the core, is that what the simulation does?

 

Anyway I have decided to go thru the minimal course and learn the coding basics etc.

 

Terry Raymond

 

Tags (2)
0 Kudos
7 Replies
Explorer
Explorer
5,417 Views
Registered: ‎11-25-2014

Re: eventually developing on CPLD

Hi Terry -

 

My advice would be to consider verilog instead of VHDL. It's an easier language to be productive with right from the start. I've coded in both over the years and honestly don't understand why anyone would choose VHDL over verilog given a choice between the two. Other factors come into play when you're part of a larger development team, but working by yourself on small CPLD projects going with verilog is a no-brainer IMO.

 

As for your questions, buy a book on verilog, download a free version if ISE, buy a cheap development board, watch some free on-line training videos, and download some free reference designs for your development board that you can study and play with. You'll get the hang of CPLD/FPGA development pretty quickly.

 

As for how to reverse engineer old MOS chips, can't really help you with that. Some simple ones are straightforward and are fully described in the data sheet. But others would be much more difficult to emulate. Plus there may be voltage compatibility issues if you actually wanted to plug your CPLD-emulator into a real circuit in place of one of those old chips. Whatever you're trying to do, have fun!

 

Bob

 

Instructor
Instructor
5,405 Views
Registered: ‎08-14-2007

Re: eventually developing on CPLD

I'm a little fuzzy on what you're asking here.  When you say "older MOS chips" what sort of chips are you talking about?  CPUs?  Logic functions?  PALs?

 

As far as learning a hardware description language, I also prefer Verilog but there's no reason you couldn't be just as comfortable with VHDL if that's what you want.  At that point designing the logic has a lot less to do with the underlying hardware (CPLD vs FPGA) just like it's not so important whether you are coding for an ARM or x87 CPU when writing in C++.  CPLDs will be much more limited in the amount of hardware you can fit into a device.  Using the ARM vs x87 metaphor, they would be more like coding in C++ for an old 8-bit micro with 64K memory space.  Implementing a CPU would be much easier in an FPGA, for example.  If you were talking about 74xx or 4000 series CMOS chips, then a CPLD would be good enough.

 

In any case, you can test drive the software without any need for actual hardware.  You can see what the circuits you design do using simulation.  You can try fitting the same design in different FPGA or CPLD families and see how much of each device is required to implement the design.

-- Gabor
Scholar u4223374
Scholar
5,386 Views
Registered: ‎04-26-2015

Re: eventually developing on CPLD

As @rjsefton and @gszakacs have said, it'll probably be easier to start with an FPGA (and also with Verilog; I too prefer that to VHDL). With simple designs on modern FPGAs, you simply don't have to worry about space - you can write horribly inefficient code and it'll fill a whole 1% of the chip. You can also use Vivado's fancy debugging tools (logic analysers built into the FPGA) which simply don't fit on CPLDs.

 

The single exception I can see is if you're just emulating very basic logic chips (eg. an 8-input AND gate, flip-flops, timers, etc). In that case, using ISE's schematic editor (lets you design a gate-level schematic) might be more intuitive for you than learning Verilog/VHDL - and since pretty much everything will be broken out to pins anyway you won't have to worry about getting access to the internals for debugging.

 

If you're after something complex (like a CPU) then an FPGA is definitely the way to go. Quite apart from the analysis and debugging tools, an FPGA has two big advantages:

 

(1) A modern FPGA like an Artix-7 will use Vivado rather than ISE, which means it'll tend to work on newer operating systems (ISE is obsolete and unsupported).

 

(2) With the resources on an FPGA you can simulate a whole computer, not just a chip. You've got tens of kilobytes of fast RAM available, and many development boards offer keyboard input, VGA/HDMI output, etc.

 

With regards to datasheets: for pretty much any non-trivial chip, the datasheet will not show the details. After all, if (for example) Intel released a datasheet showing the exact internal layout of a Core i7, someone would copy it - and it's really hard to find a legitimate situation where having a hundred-thousand page datasheet listing a billion transistor connections would be useful.

 

Instead, the datasheet will explain how the chip is meant to behave. From this you should be able to generate equivalent logic in an FPGA - but it won't be identical and you'll often find that when you do things that are not covered in the datasheet (eg. invalid instructions) the results are very different. The same may apply even for chips of the same family from the same manufacturer - Wikipedia lists a variety of instructions for the 6502 that had different effects depending on what version of the chip you got.

0 Kudos
Observer traymond
Observer
5,261 Views
Registered: ‎02-12-2016

Re: eventually developing on CPLD

Hi,

Mainly approximated Commodore MOS IC's.

By approximating youre not copying the original mask or others work.

I did get a very helpful response by instead using Verilog instead of VHDL, I was told that Verilog language is easier to

learn.

I cant remember the FPGA tool, but this tool I guess is a way of testing the prototype code, if that passes then you could go to the second stage of compiling this into a CPLD programmable chip, then put that into a Commodore 8-bit circuit.

Mainly Im interested in right now the C=64 Motherboard chips, of course the simpler ones to start with.

 

I will try to see what simple FPGA Xilinx project boards I could purchase and try that, and he said there are available books on

learning Verilog language, I can tinker with the simpler stuff and learn that first I think.

 

So will learn the basics, but new to me that VHDL is harder and Verilog is easier.

 

I had tried none Xilinx software Diamond, it was very overwhelming.

 

Will none Xilinx boards work with Xilinx Software, possibly the Free software?

I have an out of date XO Prototype board I was wondering if this would be enough for coding some of the simple

stuff anybody would start out with, as far as learning Verilog?

 

Where on Xilinx could I find a book on learning the basics of Verilog?

 

Thank you,

 

Terry Raymond

 

0 Kudos
Observer traymond
Observer
5,260 Views
Registered: ‎02-12-2016

Re: eventually developing on CPLD

Hi,

 

Yes Simulation is what the older CBM MOS chip Engineer was referring to.

 

I was told one can simulate the code, if that passes then you can compile this into a programmable CPLD chip

using a chip programmer.

Actually here Im only trying to approximate the Commodore MOS chips so as not to copy or steal others work, doing this is

allowable is my only intention.

I was told the 1980's MOS production is far too expensive.  Commodore made a million chips in its runs costing a million dollars,

etc.

Just a hobby, and I love these old computers.

Anyway little by little I will try Verilog then and find a book, simple evaluation board, learn the basics.

 

I was wondering how I could find an inexpensive CPLD chip programmer, Ebay prices are very high for these.

 

Thanks all for your help and support.

 

Terry Raymond

 

0 Kudos
Scholar u4223374
Scholar
5,233 Views
Registered: ‎04-26-2015

Re: eventually developing on CPLD

I cant remember the FPGA tool, but this tool I guess is a way of testing the prototype code, if that passes then you could go to the second stage of compiling this into a CPLD programmable chip, then put that into a Commodore 8-bit circuit.

Mainly Im interested in right now the C=64 Motherboard chips, of course the simpler ones to start with.

 

Sounds like a fun project! The only big issue I can see is that the C64 was most likely a 5V system. As far as I know, no current FPGAs are 5V-tolerant, and even 5V CPLDs are getting extremely hard to find (the only Xilinx ones are the XC95 series, which are out of stock at Digikey and unlikely to be in stock ever again).

 

I will try to see what simple FPGA Xilinx project boards I could purchase and try that, and he said there are available books on

learning Verilog language, I can tinker with the simpler stuff and learn that first I think.

 

Definitely try that. The textbook I learnt Verilog from was Digital Design: Principles and Practices. No idea if it's the best one available, but it was pretty good. Of course, as with any engineering-type work, by far the best way to learn is to try things. ISE and Vivado will not allow you to do anything that'll damage the FPGA; at worst it'll just completely fail to do anything until you reprogram it.

 

So will learn the basics, but new to me that VHDL is harder and Verilog is easier.

 

I wouldn't say "easier". Just much more familiar and intuitive to those of us who are vaguely familiar with common programming languages like C and Java (the syntax is very similar to C). VHDL syntax has a lot in common with Ada, which can be extremely confusing for people transitioning from C/Java. In either case, the learning curve is substantial - writing hardware is nothing like writing software. However, being able to do so with familiar syntax certainly helps.

 

I had tried none Xilinx software Diamond, it was very overwhelming.

 

Will none Xilinx boards work with Xilinx Software, possibly the Free software?

I have an out of date XO Prototype board I was wondering if this would be enough for coding some of the simple

stuff anybody would start out with, as far as learning Verilog?

 

Unfortunately that's the case with most (possibly all) FPGA tools. Vivado is the closest I've seen to a "simple" one, since you can at least drag-and-drop blocks and connections (for some things).

 

Xilinx software only works with Xilinx devices. The boards themselves do not have to be Xilinx (eg. Digilent makes a lot of hardware that uses Xilinx FPGAs and therefore works with Xilinx software). Your XO Prototype board will have an FPGA from Lattice Semiconductor, so that won't work with any Xilinx software.

 

Of course, for initial coding there's no need for hardware at all - the Xilinx simulator is adequate. For cheap development boards, I notice that Digilent currently has a Coolrunner II CPLD Starter Board on special. This includes a JTAG programmer built-in, and for $40 it's probably a decent way to start with CPLDs (although the Coolrunner II is a 3.3V part and won't work in a 5V system). On the other hand, for $55 you could have a Snickerdoodle Zynq development board, which offers (at a very rough guess) hundreds of times as much logic, and a dual-core ARM processor, and 512MB of RAM, etc - but it's probably too much for what you're after.

 

Digilent also sells standalone JTAG programmers, but they're more expensive than just buying a board with built-in JTAG. I'm not sure whether you can use the JTAG onboard the Coolrunner II starter board to program other devices; I suspect it'd work but it's probably not technically supported.

0 Kudos
Instructor
Instructor
5,203 Views
Registered: ‎08-14-2007

Re: eventually developing on CPLD

Just one other remark about "CPLD" vs "FPGA."  In recent years, these terms have become a bit muddied.  For example, the MachXO series from Lattice are called "CPLD" but their architecture is exactly like an FPGA.  The only difference is that they are on the small end of the parts offered by Lattice, and you can get them with a built-in core voltage regulator so they can work on a single supply.  Other than that, they're pretty much the same as the Lattice XP "FPGAs."

 

Xilinx CPLDs are of the older macrocell structure that most people think of when you say "CPLD."  CoolRunner II is the better choice for low power and ease of programming, however as mentioned only the older 9500 and 9500XL series are 5V tolerant.  The 9500XL series is a lot like other early CPLDs other than its 3.3V power supply.

 

I'm not sure what you're trying to implement in hardware.  Usually the selection of an eval or starter kit is mostly based on the peripherals you can get for it.  When you're trying to emulate a chip, that typically means you'd like a board that's small and brings out a lot of IO pins to a simple header.  I bought a Scarab miniSpartan6+ board that is pretty good for such projects as long as you don't need 5V tolerant I/O.  For that you might look at offerings from Enterpoint, who make obsolete chip replacement cards packaged as a large DIP.

 

If you think you need hardware to test your code out, I'd say think again.  You can do a lot with simulation, although it might not be as fun as watching real hardware working.  And the tools to get you there are free (WebPack versions).

-- Gabor
0 Kudos