Articles

Programmable Logic Design by John DeVos

A new way to save time and money in electronic product development.

Overview

In product development, BIT 7 is frequently faced with critical design strategy decisions regarding implementation of logic circuitry. For any circuit requiring more than a few gates, the clear choice now is programmable logic.

A programmable logic device (PLD, also referred to as a PAL, PLA, CPLD or FPGA among others) is essentially a collection of general purpose digital circuitry and interconnection resources. The design process for a PLD results in a specification of how those resources are configured and connected together to implement the desired circuit. Rather than select different components and physically connect them to get the desired circuit behavior, the engineer can add a PLD to the circuit and implement all the required logic circuitry in the PLD with greater ease and flexibility.

Applications

The spectrum of programmable logic parts runs from simple 16 pin PALs suitable for replacing a few logic gates to multi-million gate, thousand pin FPGAs capable of implementing complex data processing functions or special purpose microprocessors.

A typical small application might be to replace several logic gates spread among a few chips in a design with a single chip programmed to perform the same functions. These include address decoding, glue logic or simple signal generators. More involved circuits might include sequence controllers, state machines etc.

Large applications may include interface control blocks (e.g. PCI bus, DVI), arithmetic processing or other data processing. Microcontrollers can also be included in FPGAs which, with the addition of controlling software, can result in complete, highly specialized designs in a single chip. FPGAs are also used to prototype microcontrollers, microprocessors and other designs intended for implementation in ASICs.

Advantages

The use of programmable logic parts in circuit design is becoming more and more common for a number of reasons:

Space Saving / Reduced Chip Count: Where space constraints are demanding, replacing a few chips with just one of comparable size can make a big difference. In larger designs, a programmable part can replace dozens of chips. Total assembly cost may also be less due to reduced complexity. This is especially true for larger designs.


Flexibility: Once a circuit board is made, any changes necessary to correct errors or implement design changes must be made with cuts-and-jumpers, and eventually a new board revision that includes all updates will be needed. Once a programmable part is properly connected to all the necessary inputs and outputs, changes can be made by simply reprogramming the part on the board, or at worst, replacing the part. In a complicated design, this can save several PCB revisions and a lot of time. It also allows upgrades and modifications to existing products after production and even after they have been deployed into the field if this consideration is accommodated from the start.

Performance: While the challenges inherent in high-speed circuit design still apply inside programmable parts, the greatly reduced physical size of the circuit compared to an individual chip implementation, the encapsulation of the circuitry in the programmable part, and dedicated, low-skew routing of critical clock signals, and automatic, timing-analysis-based, iterative circuit placement and routing make it easier and less time consuming to achieve high performance in a chip than on a circuit board implementing the same function.

Time to Market: Because the design can be modified while in development with out costly and time consuming PCB revisions, the development time of a design using programmable parts can be significantly shorter then than an equivalent standard logic design.

Product Life Cycle: Because programmable logic solutions can easily be upgraded with new design while in the field with little or no disturbance to production, it is possible to extend the product life or take into account changing specifications in a design by upgrading products or fixing bugs without having to modify hardware.

Design Methods

To leverage the experience of engineers and designers everywhere, most programmable logic design tools include schematic capture capability. This allows designs to be created and documented the same way they have been for many years.

Another approach to programmable logic design is to use a hardware description language (HDL) such as VHDL or Verilog, or one of a new class of such languages including SystemC and System Verilog. Though capable of describing even the most basic circuitry, this approach has the advantage that complicated circuitry can be described in just a few lines of text. For large designs, HDLs are preferred over schematics throughout the industry because of their ability to better handle complex circuits. Another advantage of HDLs is portability. A design specified in VHDL can be moved to a different manufacturer’s part usually with modifications only to component or tool-specific sections of the design (e.g. on-board memory blocks).

Any combination of schematic and HDL design entry is possible and can be used as is fitting to a particular project. In the case of a large design for example, the advantages of both schematic and HDL design methods might be exploited by depicting the top level schematically and describing lower level blocks in an HDL. The system architecture would then be clearly shown graphically, while the blocks that make up the design would be defined in text.

Examples

Video Processing: Another customer uses FPGAs in their video test equipment for the reduced circuitry size and increased flexibility. The resulting products can be much smaller and easier to use than older equipment, and existing designs can be updated to support new video display formats with no hardware modifications.

Experiment Controller: In a design intended for use in a satellite-based experiment, we used an FPGA to implement a state machine-based controller which controlled external hardware to acquire of data from multiple channels, average and store the data. Another module in the design provided an interface to a custom microcontroller address & data bus and synchronized bidirectional transfer of data between the bus interface and state machine modules.

Print Engine: In a printing application, we were able to implement a complex circuit in an FPGA that performed many functions that had previously been handled in software. The resulting design is much faster than its pure-software predecessor.

The final decision on which direction works best for your product can be affected by a variety of factors, including budgets, timing, logic requirements and future plans. If you would like some help refining your design strategy, please let us know.

www.bit7.com