Elevate your design and manufacturing processes with Autodesk Fusion
This post is also available in: Français (French) Italiano (Italian) Deutsch (German)
This article provides a detailed overview of about an essential digital electronic device known as CPLD (Complex Programmable Logic Device).
Information technology, the internet, and electronic chips serve as the foundation of the modern digital age. Almost all modern technologies owe their existence to electronics, from the internet and cellular communication to computers and servers. Electronics is a vast field with many sub-branches. This article will teach you about an essential digital electronic device known as CPLD (Complex Programmable Logic Device).
Evolution of Digital Electronics
Electronics is a complex field with thousands of electronic devices and components in existence. However, broadly speaking, electronic devices are in two main categories: analog and digital.
In the early days of electronics technology, circuits were analogous, such as sound, light, voltage, and current. However, electronics engineers soon found out that analog circuits are highly complex to design and expensive. The demand for speedy performance and quick turn-over times led to the development of digital electronics. Today almost every computing device in existence incorporates digital ICs and processors. In the world of electronics, digital systems have now completely replaced analog electronics due to their lower cost, low noise, better signal integrity, superior performance, and lower complexity.
Unlike an infinite number of data levels in an analog signal, a digital signal only consists of two logic levels (1s and 0s).
Types of Digital Electronic Devices
The early digital electronic devices were rather simple and consisted only of a handful of logic gates. However, over time, the complexity of digital circuits increased thus, programmability became an important feature of modern digital control devices. Two different classes of digital devices emerged to provide programmability. The first class consisted of fixed hardware design with reprogrammable software. Examples of such devices include microcontrollers and microprocessors. The second class of digital devices featured reconfigurable hardware to achieve flexible logic circuit design. Examples of such devices include FPGAs, SPLDs, and CPLDs.
A microcontroller chip features a fixed digital logic circuit that cannot be modified. However, programmability is achieved by changing the software/firmware that runs on the microcontroller chip. On the contrary, a PLD (programmable logic device) consists of multiple logic cells whose interconnections can be configured using an HDL (hardware description language). Therefore, many logic circuits can be realized using a PLD. Due to this, the performance and speed of PLDs are generally superior to that of microcontrollers and microprocessors. PLDs also provide circuit designers with a greater degree of freedom and flexibility.
Integrated circuits meant for digital control and signal processing typically consist of processor, logic circuit, and memory. Each of these modules can be realized using different technologies. The available options are shown in the following figure:
Introduction to CPLD
As discussed earlier, several different types of PLDs (programmable logic devices) exist, such as FPGA, CPLD, and SPLD. The primary difference between these devices lies in circuit complexity and the number of available logic cells. An SPLD typically consists of a few hundred gates, whereas a CPLD consists of a few thousand logic gates.
In terms of complexity, CPLD (complex programmable logic device) lies in between SPLD (simple programmable logic device) and FPGA and thus, inherits features from both these devices. CPLDs are more complex than SPLDs but less complex than FPGAs.
The most used SPLDs include PAL (programmable array logic), PLA (programmable logic array), and GAL (generic array logic). PLA consists of one AND plane and one OR plane. The hardware description program defines the interconnection of these planes. An illustration of PLA is provided as follows:
PAL is quite similar to PLA however, there is only one programmable plane instead of two (AND plane). By fixing one plane, the hardware complexity reduces. However, this benefit is achieved at the cost of flexibility.
CPLD Architecture
CPLD can be considered as an evolution of PAL and consists of multiple PAL structures known as macrocells. In the CPLD package, all input pins are available to each macrocell, whereas each macrocell has a dedicated output pin. The block diagram of a CPLD is in the following illustration.
From the block diagram, we can see that a CPLD consists of multiple macrocells or function blocks. The macrocells are connected through a programmable interconnect, which is also referred to as GIM (global interconnection matrix). By reconfiguring the GIM, different logic circuits can be realized. CPLDs interact with the outer world utilizing digital I/Os.
Difference between CPLD and FPGA
In recent years, FPGAs have become very popular in the designing of programmable digital systems. There are many similarities as well as differences between CPLD and FPGA. As for similarities, both are programmable logic devices consisting of logic gate arrays. Both devices are programmed using HDLs such as Verilog HDL or VHDL.
The first difference between CPLD and FPGA lies in the number of gates. A CPLD contains a few thousand logic gates, whereas the number of gates in an FPGA can reach millions. Therefore, complex circuits and systems can be realized using FPGAs. The downside of this complexity is a higher cost. Hence, CPLDs are more suitable for less complex applications.
Another key difference between these two devices is that CPLDs feature a built-in non-volatile EEPROM (electrically erasable programmable random-access memory), whereas FPGAs feature a volatile memory. Due to this, a CPLD can retain its contents even when powered off, while an FPGA cannot retain its content. Moreover, due to built-in non-volatile memory, a CPLD can start operating immediately after power-up. Most FPGAs, on the other hand, require a bit-stream from an external non-volatile memory for start-up.
In terms of performance, FPGAs have an unpredictable signal processing delay due to highly complex architecture combined with the user’s custom programming. In CPLDs, the pin-to-pin delay is significantly smaller due to simpler architecture. The signal processing delay is an important consideration in the design of safety-critical and embedded real-time applications.
Due to higher operating frequencies and more complex logic operations, some FPGAs might consume more power than CPLDs. Thus, thermal management is an important consideration in FPGA-based systems. Due to this reason, FPGA based systems often employ heat sinks and cooling fans and need larger, more complex power supplies and distribution networks.
From an information security point of view, CPLDs are more secure as the memory is built into the chip itself. On the contrary, most FPGAs require external non-volatile memory, which can be a data security threat. Although data encryption algorithms are in FPGAs, CPLDs are inherently more secure in comparison to FPGAs.
Applications of CPLD
CPLDs find their application in many low-to-medium complexity digital control and signal processing circuits. Some of the important applications include:
- CPLDs can be used as bootloaders for FPGAs and other programmable systems.
- CPLDs are often used as address decoders and custom state machines in digital systems.
- Due to their small size and low power consumption, CPLDs are ideal for use in portable and handheld digital devices.
- CPLDs are also used in safety-critical control applications.
CPLD Manufacturers
CPLDs and FPGAs are high-end programmable logic devices that are hard to manufacture. Major manufacturers of CPLDs are:
- Altera (acquired by Intel)
- Xilinx (acquired by AMD)
- Atmel (acquired by Microchip)
- Lattice Semiconductor
CPLD Programming and Development
The first step in developing a CPLD based digital system is to select the device manufacturer. As described earlier, multiple manufacturers manufacture these devices. After consulting the project requirements and device datasheets, an appropriate device is to be selected. The deciding factors are cost, power consumption, number of I/O and macrocells, operating voltage, and thermal characteristics.
After the selection of the CPLD model, the next step is the setup of the programming and testing environment. This comprises a software package used for the design, testing, and verification of the circuit. Examples of programming software include Altera Quartus, Xilinx ISE/Vivado, Lattice Diamond, and Atmel ProChip Designer. These software packages allow program development using Verilog and VHDL hardware description languages.
After creating logic description in HDL, the hardware device/development board connects to the software through a program and debug cable adapter. Many development boards have built-in programming devices. However, if the programming device is absent, you can use a JTAG programmer.
After the design, testing, and verification of the CPLD program, the program is downloaded into the chip, and a system prototype can be produced. A PCB can be designed which houses the CPLD and surrounding electronic components. After integration, the device is tested for bugs and errors. After debugging, the prototype is ready to be sent into production.
Digital electronics is the backbone of modern information technologies. Programmability is a key factor in the design of digital systems. Programmable digital devices are of two types: processors and PLDs. PLDs offer superior performance and flexibility due to reconfigurable hardware. CPLDs are one of the three major types of PLDs, along with SPLDs and FPGAs. In terms of performance and complexity, CPLDs lie in between SPLDs and FPGAs. With built-in non-volatile EEPROM, CPLDs have the advantage of enhanced data security and boot-up speed over FPGAs.
In this article, we provided you with a complete overview of CPLDs, including architecture, diagrams, applications, and programming methods.
Ready to start with Fusion 360 electronics? Start a free trial today.