Electronic – When is a FPGA preferred instead of a CPLD, and vice versa

fpgaprogrammable-logic

I am starting out with programmable logic, and I am mostly using schematic entry. (Hey, I like to see the schematic instead of VHDL/VERILOG :P)

I have been using a Xilinx CPLD originally that had 128 macrocells, and the design has a data bus and used tri state buffers extensively. Turns out it did not fit into the CPLD, and the next step on digikey was a Xilinx FPGA ($5.80), so I figured all I would have to do was change the device to the FPGA in the ISE. Apparently the Tri state buffers do not exist on an FPGA which means I have to redesign a great deal. Also, one of the main reasons I wanted to use a FPGA was because the FPGA can be programmed using a SPI flash instead of JTAG. (I don't have any JTAG programmers, but I have MCU's to program SPI flash) There is the MachXO2 on digikey for similar price but with 640 macrocells, which I figure should be more than enough, not to mention that it can be programmed using SPI flash, and probably has the Tri state buffers.

So, here is the question. When are CPLD's used instead of FPGA's and vice versa. In what applications does a CPLD not make sense, but a FPGA is better suited for?

Best Answer

Usually it is a system trade-off. How many voltage rails are needed, how many discrete ICs are required, how much power, amount of logic.

CPLDs, usually, are smaller (less programmable resources), usually require a single voltage rail, do not require an external PROM. As mentioned, usually used for glue logic, in place of discrete gates.

FPGAs are, usually, much large (more logic resources). Require multiple voltage rails, consume more power.

Most projects people describe are most appropriate for FPGAs.