Introduction
In the course of designing PCBs, it is important to make a distinction between FPGA and CPLD because the two can be vastly different in terms of functionality and efficiency. PCBTok will discuss here in detail in order to assist the client in determining which one is more suitable for their PCB requirements.
FPGA and CPLD
These are both configurable integrated circuits and this implies that they can be programmed to do certain functions. These ICs have an Analog & Digital blocks in matrix form that can be programmed by using Programmable, One Time Programmable (OTP) Non-Volatile Memory. This is something that is achievable when using FPGA and CPLD and this is one of the advantages of using the two. It also offers unique pieces which are intended for the particular purpose you need them for; this makes it possible for you to come up with flexible solutions for the project you are handling. Such devices are flexible in their design and thus can incorporate transformable functions into a single circuit. This is particularly important for the future electronic systems since this way they are capable to versatilize for various uses or various conditions.

What is CPLD?
CPLD is the short form of “Complex Programmable Logic Devices”. It is a semiconductor chip which is used in implementing digital systems. A CPLD comprises of programmable functional blocks whereby each block contains macrocells. CPLD’s basic elements are macro cells. I/O of functional blocks is interconnected through so called Global Interconnection Matrix (GIM). This interconnection matrix is reconfigurable for the reason that there are no contacts between functional blocks that can be altered. In fact these functional blocks are analogous to a set of logic gates used in the development of circuits.

How Does it Work?
This technology applies types of memory such as CMOS EPROM, EEPROM, Flash memory and SRAM to construct tiny, rapid and energy effective logic circuits. These devices are classified as large scale integration circuits because they are large in size and have a complicated structure. CPLD user can create their own logic circuits. The design of digital systems is done in the following manner, special software and hardware description language is used to arrive at the design. After that, the code is burned into the chip with the help of a download cable which is known as in-system programming.
Components of CPLD
Let’s delve more on the elements that make up the CPLD and how each plays its role in the overall performance of the device.

Function Block
In CPLD, function block is the most important block in designing of CPLD. It has an AND plane which receives inputs from other FB or I/O FB. These are then combined and fed into an OR array and then fed into a multiplexer (MUX). The MUX’s output can either go directly out of the block or through a gated flip-flop in the form of a timed flip-flop. This function block may also have a master reset input, a selectable exclusive OR function and adjustable polarity programming.
Interconnect
In a CPLD the interconnect is a set of programmable connection points through which signals can be routed within the CPLD. This large matrix enables you to route the signals precisely where you want and want them to go and this is certain to ensure that all the components in the system inter-connect quickly and effectively.
Input/Output blocks
Thus, with the help of input/output blocks, signals with the required voltage and current are transferred to the CPLD pins. It allows the elimination of wait times, reduction in the idle time of the device and the addition of extra resources.
Advantages of CPLD

Adaptability
This is because you can reprogram CPLDs multiple times hence making them very flexible. You can modify them for diverse logic requirements depending on the changes that occur in your project. Using this flexibility, you can make some changes without having to invest in new hardware which is time consuming and expensive.
Consolidation
CPLDs make it easier for you to design your boards because they enable you to incorporate several logic blocks into a single chip. This is beneficial in a way that you do not have to buy extra parts, which will only clutter up your setup. Less number of external parts are less connections to make and less complications, which will save you time and minimize on mistakes.
Rapid Development
CPLDs aid you in the development of your project since it is easy to design and prototype with them. They are programmable and thus you are able to modify the design and experiment with new concepts without having to wait until new hardware is developed. This fast development cycle will help you to spend less time and bring your design to the market faster.
Disadvantages of CPLD

Restricted Capacity
CPLDs are less complex than FPGAs. CPLDs however have limited density as compared to FPGAs in terms of the number of gates they can hold. These have limited number of logic elements hence you may find yourself constrained in the development of complex designs. If your project involves a lot of sophisticated logic then you may not find CPLDs useful to your project in some way.
Reduced Performance
CPLDs are, however, generally slower than FPGAs when it comes to performance. These devices usually have slower clock rates and slower propagation delays as compared to other devices. This can be disadvantageous in projects which require frequent data processing within a short time. But if you need your design to perform quickly, then you may not get the best results with CPLDs.
Fewer Resources
CPLDs can have less resources and functionality than the FPGAs. This limitation may limit what you can do with your design in some way. However, if you want more elaborate functions or more options, CPLDs might not fit the bill. For more complex projects, you may get a better option from FPGAs.
Application
Here are popular applications where you can see CPLDs in their PCBs:
SDRAM Controller
The design presented in this paper includes a simple SDRAM controller which works with a 64MB SDRAM and a 16-bit data bus and can be implemented using a CPLD. These include commanding the SDRAM, generation of the refresh cycle, and bank and row and column selection among others and these are controlled by the CPLD. It also manage data bus buffering. Because of its parallel I/O capability and a dependable timing system, the CPLD is perfect for these primary operations. However, for the more developed memory controllers the usage of FPGAs is more appropriate.

LED Controller
Using a mere CPLD, it is possible to manage and regulate a system of eight RGB LEDs for illumination purposes. This handles debounced button inputs where the user is able to choose between various modes. It also includes PWM signals that are used to control the brightness of the LED’s. It turns LEDs on or off when required. The CPLD used in this controller has eight to sixteen macrocells which are sufficient for all the “glue logic” of this controller. Since it has a parallel I/O, it means that you can control many LEDs at a go. The control of the PWM waveforms is achieved through timers that are incorporated in the logic therefore, it is efficient and effective.

Motor Controller
To control a motor controller which regulates six motors you will require a mid-size CPLD. The CPLD deals with speed and direction control of each motor and also the enable signals of the motors. It also receives position and speed information and checks analog voltage. Due to the macrocells, the CPLD generates enable signals for controlling each motor as well as signals to drive them. In the CPLD there is an additional logic to check inputs and to process the feedbacks. This arrangement makes it easier to have good control of the motors in order not to produce drastic changes in their speed or movement.

What is FPGA?
A system that is composed of a two dimensional array of programmable logic blocks that are interconnected with programmable interconnects. Once an FPGA has been created it can be reprogrammed to suit other functions. In today’s FPGAs there are about 330,000 logic blocks and 1,100 I/O pins. In this case, you have to create your circuit and set it up with the help of Hardware Description Language (HDL). This makes it possible for an FPGA to work like a simple gate such as the AND gate or like a multiple core processor. The disadvantage is that it has its configurations in the main memory meaning that if power is cut off then the configurations will be lost.

How Does FPGA Work?
A structure which consists of a two dimensional array of programmable logic blocks and programmable interconnects. An FPGA is then a programmable chip that once developed may be modified for other purposes. Today’s FPGAs come with about 330,000 logic blocks and 1,100 I/O pins. In this case you have to design your circuit and implement it with the use of HDL (Hardware Description Language). This makes it possible for an FPGA to act as a simple gate, for instance, the AND gate or as a multiple core processor.
Components of FPGA

Logic Blocks
An FPGA has programmable logic blocks which play an important role in the FPGA. You can also define and modify the logic functions for your use. It also offers the flexibility of designing circuits to perform specific functions and functions that are difficult to perform.
Routing
Functionality in an FPGA is realized through programmable routing. It enables one to route signals between separates parts of the FPGA in a way that is most appropriate. This makes it possible to create and modify links according to the desired design needs one may have.
I/O Blocks
They control the flow of data in and out of FPGA thereby enabling the connection with other devices. This helps you to guarantee that your FPGA has a reliable means of interacting with other devices and systems.
Advantages of FPGA

Adaptability
The major advantage of the FPGAs is the ability to define and re-define the logic functions as required. This means that you are able to make adjustments according to the particular needs or even to the changes in the needs. Whether you have to tune some functions or change your design, FPGAs help you to do it without much effort.
Speed to Market
FPGAs are used to ensure that you bring your ideas to market as fast as possible. They enable quick development and testing of ‘mashup’ applications and quick modification during the development stage. It can help you experiment and iterate your ideas more frequently, which, in turn, will help you shorten your project’s timeline and time to market.
High Performance
FPGAs are very efficient in the way they perform tasks since they are able to do so within a short time. They can handle data input and can work on many operations at the same time. Most suitable for the applications that require more speed and power to compute in order to achieve better result within a short span of time.
Disadvantages of FPGA

Cost
The major disadvantage of FPGAs is that they are often more expensive than CPLDs especially when used in large scale projects. While working on a large scale design, you may realize that FPGAs are costly. This is something that has to be considered if the cost is a concern since it’s an added expense.
Power Usage
Most of the times, FPGAs will consume more power than CPLDs. There is one disadvantage however, if power consumption is a concern in your project then this could be a problem. When more power is consumed then more heat is produced and energy bills also become expensive.
Complexity
Designing for FPGAs is somewhat more challenging because these devices provide numerous resources and channels for interconnection. This means that you are exposed to more options which is good, but the design process becomes more complex and complicated.
Application
Here are popular applications where you can see FPGAs in their PCBs:
Encryption Accelerator
They also have the capability of performing encryption algorithms such as AES and SHA and RSA. To implement a system that is capable of high-speed information transfer, parallel encryption/decryption engines to perform multiple operations at the same time and low latency request management. Such applications are best addressed by FPGAs because they are faster and more efficient than software counterparts. The nature of FPGAs as reconfigurable fabric means that multiple encryption pathways can be established, which provide for high throughput. Also, FPGAs provide easy access to the engines of encryption which leads to the reduction of latency. These are perfect for accelerating the encryption processes due to the following reasons.

Real-Time Video Processing
FPGA is very suitable for real time video processing. It is possible to apply them for the image filtering, motion estimation in video codec and building image pyramids. FPGAs are capable of handling these chores because they are parallel systems. Some of the computations such as motion estimation and pixel processing are performed using special DSP blocks in FPGAs. They also produce image pyramids in the most effective manner with the use of their logic fabric. If you are implementing a neural network for object detection, then these can be configured to the FPGA’s programmable logic. This configuration guarantees high and fast video processing, making FPGAs the most suitable for handling of video tasks in real time.

High-Speed Network Router
When one has to deal with a router that has to handle up to 400 Gb per second, efficient packet forwarding and quick look up in the routing table are important. The same is achieved by the FPGAs through the use of DSP slices and flexible logic blocks. They also support traffic shaping, and high memory bandwidth for buffering data. These include 100Gbps Ethernet for instance, through the use of multiple network interfaces, data transfer is made easier through the use of the I/O blocks. This makes them ideal for use in high end network systems where issues such as performance and flexibility are of the essence. You obtain the speed and reliability that is required for undertaking complex network tasks.

FPGA and CPLD Feature Comparison
The following table will present the most important characteristics of FPGAs and CPLDs programmable logic devices, including their possibilities, structure and utilization.
| CPLD | FPGA | |
| Abbreviation | Complex Programmable Logic Devices. | Field Programmable Gate Arrays. |
| Architecture | Classified as coarse grain. It has larger and more general logic blocks as compared to the ones with finer grain. | Classified as fine grain. Has many small, and very versatile logic blocks which enable the construction of intricate and elaborate circuits. |
| Applications | This is the best for the basic usage only. These are capable of carrying out fundamental functions such as logical functions as well as simple control systems. | Perfect for complicated applications. It is also used in applications that require more computational power or have complex operations, including high-level signal processing or high-speed data management and custom hardware calibration. |
| Based on | CPLDs are based on EEPROM technology, each cell of the CPLD is programmable. It employs a type of memory which can be written to and erased electrically. | These FPGAs are based on RAM technology. RAM is a volatile memory in your computer which is used to hold data and instructions that are currently being used by your system. |
| Clock Management | What you will notice when using a CPLD is that, when it comes to clock management, the CPLD is not very powerful at all. It presents limited ways of managing and distributing the clock signals than the other complex systems which are used in the design of digital circuits.
| This means that when using an FPGA you can manage the clock in a much better way. It also contains complicated tiles for clock management and can work with several clock zones and manage skewing as well as support frequency synthesis. |
| Cost | Cheaper. | Expensive. |
| Definition | A chip that assists in the control of digital devices. Digital systems employ two states symbols for instance the binary digits (0 and 1) in its information representation in contrast to the analog system that employs a continuum of values. | Can be programmed after being manufactured. You are able to set it up for a particular task and it will do that task in the best possible way that you want it to. |
| Design Entry Methods | Implemented by logic equations for the description of the macrocell function with a more simple control. | Utilizes VHDL or Verilog for complete control of the behavior and physical layout of the design. |
| Density | Low density to medium density. | Medium density to high density. |
| Development Tools
| When you are working with CPLDs you are using less complex logic compilers that provide less verification ability. This is easier to implement in the development process but the tools that are used for this purpose are not as powerful as those for other devices. | When using FPGA, one is able to have a number of development tools that can help in the simulation of the design, the analysis of the timing and the layout. These tools assist you in fine tuning your design to make it more efficient and sue for your project needs. |
| Interconnect Structure | The interconnection structure of the CPLDs is rigid. The linkages between the elements are made when the product is being manufactured and cannot be adjusted. | Interconnect structure of FPGAs is flexible in nature. This way, you are able to control how and where the components are connected and how they can exchange the information. |
| Logic Blocks | Has around 100 to 1000 of logic gates and are therefore useful in lesser functions such as glue logic. Such logic blocks can be used to join various components of a circuit and perform less complicated tasks very well. | Has around 100,000 logic gates. You can use this to devise complicated circuits. This high capacity enables one to perform more complex operations and come up with complex designs with a lot of ease and in the shortest time possible. |
| Performance | CPLDs have low performance due to their basic structure as compared to other two types of PLDs. While they are quite effective in simple operations, they may not be the best to use in a complicated operation as compared to other choices. It is based on the routing and as such its performance is directly proportional to the routing. | These, along with the availability of high number of I/O interfaces, dedicated memory blocks and DSP blocks for signal processing make FPGAs high performance devices. It offers stable throughput that has nothing to do with internal routing. |
| Power Consumption | Often times they consume more power than the other available options. They are generally more powerful and can consume more energy hence may need to be put into consideration while designing. | Less power consumption as compared to CPLDs. The following are some of the advantages of more energy-efficient, which can be important for your designs. |
| Ratio of flip-flops | While comparing CPLDs with FPGAs, it can be seen that CPLDs have a lower ratio of flip-flops. | The flip-flops are more in FPGAs as compared to CPLDs. This higher flip-flop ratio in FPGAs translates to the ability to store and manipulate more data as compared to other devices. |
| Reconfigurability | CPLDs provide less reconfiguration capability as compared to the other devices. After they are established, you have limited choices as to how to alter their behavior. | FPGAs are more reconfigurable than the other devices in the market. Can easily alter the way they work even after they have been installed to work in a certain manner. |
| Security | Have characteristics which make it difficult for them to be affected by some forms of attack. | They may be at a higher risk of being exposed to some forms of attacks. |
| Structure resembles | A CPLD structure is almost the same as the PAL, or Programmable Array Logic. Also like the PALs, CPLDs are employed to configure and implement digital signals and do not have the capability to store information. | An FPGA structure resembles a gate array which is also called uncommitted logic array (ULA). As with gate arrays, FPGAs provide for customizable logic functions and can be employed for different purposes. |
| Volatility | Non-volatile. The data is not erased when power is switched off, hence your data is save. When the device is switched off, you do not lose any information or the configuration settings in it. | Unstable and are at the risk of losing data if power is switched off. If you require to load the configuration or data every time you power on the FPGA then you will have to do that. |

Choosing Between CPLD and FPGA
There are some factors which have to be considered while choosing between CPLD and FPGA. Now let us understand how each technology works in relation to the various requirements and aid you to select the best one for the job.
Design Size and Complexity
There are few factors that can help in deciding between CPLD and FPGA; they are size and complexity of the PCB design. If you have a small design with not so many logic elements and simple functionalities, then a CPLD will meet your needs well. It is good for such purposes. But if your project is rather big and involves more complicated operations, it may be more effective to use an FPGA.
Performance Needs
While comparing CPLD and FPGA, there is one factor that you should consider the performance. CPLDs normally has lower maximum clock rate and longer propagation delay than the basic PLDs. This means that they can not be the most suitable for the high-speed designs. On the other hand, FPGAs are generally developed with high speed in mind and they can solve the timing constraints issues easily. If you require real-time processing in your project FPGAs are more suitable than microcontrollers.
Power Limitations
CPLDs are known to consume less power, both the static and dynamic power than FPGAs. When it comes to the use of power, if your project demands efficiency then it would be wiser to use CPLDs. These are suitable for applications where power consumption is a major factor of consideration. FPGAs on the other hand are more powerful and therefore utilize more power.
Budget Factors
These are generally cheaper than Programmable ASICs and hence are ideal for small projects that require a small budget. They are ideal to use for easy designs at a cheaper cost. On the other hand, FPGAs are expensive but have many more resources as well as options available to the user. It is beyond doubt that these are more appropriate for more extensive and complicated designs where the additional expenses are compensated by the enhanced features. If you are working with limited funds and a smaller design then CPLDs may be more suitable for your needs. For more intricate requirements and if the cost is not an issue then FPGAs present numerous benefits.

When To Use CPLD?
CPLDs are used in certain applications where the characteristics of CPLDs prove to be most advantageous. You should use CPLDs for:
- For the tasks, which require a lot of computing power for instance video processing or encryption.
- When working with multiple data sets and you require to analytical data and working on multiple tasks at the same time.
- It is applicable especially in the use of advanced connection protocols such as the PCIe, Ethernet or SATA.
- In order to test out and develop new chips or systems before they are set in stone.

When To Use FPGA?
FPGAs are a good choice for applications which require both, flexibility and affordability. They are suitable for:
- The fundamental glue logic control functions, and the connection components.
- Low cost projects that do not require the use of many features.
- Small size designs where CPLDs have more compact options as compared to the other technologies.

Conclusion
The following are the comparison between CPLD and FPGA in their strengths and weaknesses. CPLDs are flexible integrated circuits with fast development cycles although they have limited capacity, are not as fast as others and have scarce resources. FPGAs are more flexible and offer higher performance as compared to their counterparts but they are expensive and consume more power and are also not easy to design.


Change Language