|Getting Started with Programmable Logic|
Have you ever wanted to build sophisticated logic ICs -- not microprocessors, but real digital logic? Sure, microprocessors let you perform lots of sophisticated logic functions in software, but sometimes there is no substitute for real hardware.
For example, suppose you have to monitor 16 inputs simultaneously? A microprocessor can't really watch everything at once and perform other tasks. It will sample the inputs -- maybe very rapidly -- and there may be significant delay between an event occurring and the program responding. You can use interrupts to help minimize this problem, but in the end only a piece of hardware can do things in a truly concurrent fashion without resorting to parallel processing.
For the purpose of this discussion, I'll talk about programmable logic devices (PLDs) as a broad category of ICs that can be programmed by the user to perform different functions. These aren't software programmable ICs like microprocessors, though. In practice, there are several types of PLDs including CPLDs (complex PLDs) and FPGAs (field programmable gate arrays). From our point of view, all these chips are basically the same, and differ mainly in the complexity of circuits they can mimic and price.
The general idea is simple:
It is important to realize that these bit streams are not programs in the sense of a sequential list of instructions. PLDs contain hundreds or thousands of logic gates and flip flops. They also provide a huge programmable interconnecting switch. The workstation software figures out how to connect the internal gates to match the logical description of your circuit. The program sets the "wires" between the internal gates.
Of course, the final result might not look like what you specified, but the result should be the same. For a hypothetical example, suppose you design an AND gate. However, suppose your PLD only contains NAND gates. Your design might look like this:
The final implementation might really look like this:
The software figured out that it could make an AND gate from a NAND gate with another NAND serving as an inverter. Of course, this is a simple example. A CPLD might model a few thousand gates and some FPGAs are much larger than that! With a large enough chip, you can even custom design a CPU!
© 2002 by AWC. All Rights Reserved.