CPLD Tutorial: Learn Programmable Logic the Easy Way

739px-Altera_MAX_7128_2500_gate_CPLD

The guys over at hackshed have been busy. [Carl] is making programmable logic design easy with an 8 part CPLD tutorial. Programmable logic devices are one of the most versatile hardware building blocks available to hackers. They also can have a steep learning curve. Cheap Field Programmable Gate Arrays (FPGA) are plentiful, but can have intricate power requirements. Most modern programmable logic designs are created in a Hardware Description Language (HDL) such as VHDL or Verilog. Now you’ve got a new type of device, a new language, an entirely new programming paradigm, and a complex IDE to learn all at once. It’s no wonder FPGAs have sent more than one beginner running for the hills.

The tutorial cuts the learning curve down in several ways. [Carl] is using Complex Programmable Logic Devices (CPLD). At the 40,000 foot level, CPLDs and FPGAs do the same thing – they act as re-configurable logic. FPGAs generally do not store their configuration – it has to be loaded from an external FLASH, EEPROM, or connected processor. CPLDs do store their configuration, so they’re ready as soon as they power up. As a general rule, FPGAs contain more configurable logic than CPLDs. This allows for larger designs to be instantiated with FPGAs. Don’t knock CPLDs though. CPLDs have plenty of room for big designs, like generating VGA signals.

[Carl] also is designing with schematic capture in his tutorial. With the schematic capture method, digital logic schematics are drawn just as they would be in Eagle or KiCad. This is generally considered an “old school” method of design capture. A few lines of VHDL or Verilog code can replace some rather complex schematics. [Carl's] simple designs don’t need that sort of power though. Going the schematic capture route eliminates the need to learn VHDL or Verilog.

[Carl's] tutorial starts with installing Altera’s Quartus II software. He then takes the student through the “hardware hello world” – blinking an LED.  By the time the tutorial is done, the user will learn how to create a 4 bit adder and a 4 bit subtractor. With all that under your belt, you’re ready to jump into big designs – like building a retrocomputer.

[Image via Wikimedia Commons]

Comments

  1. jooorn says:

    I wish someone made a toilet seat out of OLED screens. If the middle part had a touchscreen too you could play games with your finger or your weiner.

  2. jios says:

    Bloody mods removed my awesome comment about playing games with weiner. Shame on you.

  3. Chas says:

    Interesting article Adam.. I’m thinking about following Carl. Just waiting on the programmer.

  4. Rollyn01 says:

    Interesting, this is almost the exact same IDE and chip-set that is use at my school. They even use the same kind of coursework. Although, blinking the light wasn’t part of it. Everything else is spot on. I might just go though this as a refresher.

  5. OpenglMan says:

    I think there are a great books and much more useful and well documented. Ask me if you are interested about it

  6. OpenglMan says:

    A great book about VHDL with Altera CPLDs and FPGAs with a lot of examples is:
    “Digital Electronics: A Practical Approach with VHDL”

  7. Alan says:

    For those who want more detail –
    The designs are based on the Altera Max II family, chip is: EPM240T100C5
    They got “A cheap LC Tech board from Ali Express” – don’t ask for more detail, if you can’t find something you’re hosed before you begin.
    And – no, you can’t download the whole series as a single PDF file. For functionality like that, look at the quality Adafruit tutorials.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 94,423 other followers