the_answer

What’s all this about FPGAs?

June 9, 2006
In this installment of The Answer to Your Problems, a reader receives advice on how to use field-programmable gate arrays (FPGAs) as an embedded controller alternative to provide unique behaviors.
QUESTION:

I’m increasingly in need of more of what somebody called “mass customization” for my machine automation. Customers want more sophisticated and user-specific control variations. I’m going to start looking at FPGAs (field-programmable gate arrays) as an embedded controller alternative to provide unique behaviors without going custom-crazy. I’d like some advice.

---From April 2006 Control Design

ANSWERS:

Just Know What You’re Getting Into
FPGAs sometimes are misunderstood and over-used as a general solution for everything. In the right application they offer amazing performance, but not in all applications.

In control and automation applications you need to weigh the benefits before jumping in. FPGAs are good at doing specific things such as in-parallel processing very quickly--similar to ASICs--with the added benefit of software-loadable flexibility.

The challenge with FPGA processors is their hardware-like nature, which makes them difficult for typical software developers to efficiently use, especially in one-off or custom applications.

Ideally, FPGA use for a broader audience should be thought of as "configurable functionality" wherein the user interface modifies the pre-loaded FPGA functionality or where the user has pre-defined functional blocks that are combined. An FPGA-literate team (or a team willing to invest to become FPGA-literate) is necessary to build the functionality into configurable modules. The more configurable or customizable you make the solution set - the more challenging the user interface tends to be.

Fortunately, programming tools like those in Celoxica's high-level C-based programming kits now make FPGA computing more accessible to general C programmers. The main challenge will be deciding between the level of customizability versus the level of usability for your target audience.

Brian Tithecott, Director of Sales & Marketing, SBS Canada, Waterloo, Ontario

Can Offer Exciting Control Options
Fundamentally, an FPGA is a semiconductor device that contains a large number of gates (logic devices) that are not interconnected, and whose function is determined by a wiring list, which is downloaded to the FPGA. The wiring list determines how the gates are interconnected, and this interconnection is performed dynamically by turning semiconductor switches on or off to enable the different connections.

FPGA Benefits. FPGAs are attractive because the function of a piece of hardware can be updated in the field. Whereas microprocessors have a fixed hardware structure that executes the software, the actual hardware on an FPGA is changed. It is fair to say that for each program written for an FPGA, a new piece of dedicated hardware is designed to execute that specific function. For this reason, FPGAs are highly efficient, especially when performing repetitive instructions such as required for DSP or imaging.

Another advantage is that FPGAs permit the design of large number of parallel data paths, which can greatly increase performance for DSP and data-streaming applications. Current FPGAs can have million of gates per chip.

A good FPGA example is the world’s first 12-cylinder, fuel-injector simulator. Micronova recently developed an innovative, flexible, and programmable engine hardware in the loop (HIL) board, which represents the latest advancement in HIL simulators in the automation and simulation field. Using our LabView FPGA Module and reconfigurable I/O modules, they developed the board to simulate a direct fuel injector with up to 12 cylinders. Its compact architecture is perfectly suited for mobile automotive testing. Some of the added benefits we incorporated include more functions and interfaces in a smaller space, accuracy, and high-performance reserves for future applications. With an FPGA based IO system, Micronova developed a low cost highly flexible IO system.

Some other links to consider include “What is a filed programmable gate array (FPGA)? How do FPGA-based control systems compare to processor-based systems?"

John Hanks, Director of Measurements, National Instruments, Austin, Texas

FPGAs Will Help
FPGAs have advanced in speed and density to the point where they are an attractive alternative to microprocessors, microcontrollers, digital signal processors (DSP) and the associated glue logic. An FPGA can function as the “matrix” in which processing, peripherals, data path and algorithms can be placed to create powerful, flexible and upgradeable systems.

One of our customers, a manufacturer of subway trains, provides an example. This manufacturer has developed its own “standard” 3U, 19-in. CompactPCI system, which it configures to meet the requirements of the different countries and cities where its trains are installed. The system hardware does not change from installation to installation. But the localization is handled by a series of FPGAs that are re-configured to meet the local requirements. The standard system features a Pentium III CPU board, analog and digital I/O, sensors for position encoders and an optional MVB link. A feedback channel sends data from the vehicle to the central control station. FPGAs are used in three different boards in the system. The FPGA on the CPU board is configured with a microcontroller, a watchdog and several UARTs. A second board features eight UARTs, all of which are implemented in the onboard FPGA. These are used for asynchronous RS422 operation and optional synchronous HDLC. A third board in the system features digital I/Os, analog outputs, pulse counters, a radar sensor input and interrupt inputs, all implemented in an FPGA.
 
The point is that low-cost FPGAs are now large enough, fast enough, and easy enough to program that they are useful in a wide variety of applications. In the case described above, the FPGA contains nearly 70,000 logic elements. Because of their flexibility and adaptability, FPGAs can reduce costs and ensure time-to-market by enabling standard products to be re-configured to meet application-specific requirements. Time-consuming and expensive redesign of a board can be avoided, thus minimizing design risk of the project.  This is particularly important for systems that are deployed in only small or medium volumes.
 
FPGA technology is also very useful wherever long-term availability and/or harsh industrial environments are involved. Intellectual Property (IP) cores are never rendered obsolete or discontinued. The functionality is always available even if the hardware design must be implemented in a new FPGA. This sort of open-platform concept is being deployed successfully by more and more manufacturers and system integrators every day.

Ernest Godsey, President, Men Micro Inc., Nürnberg, Germany

August's Problem
How Do I Choose a Digital Recorder?
We're making a long overdue change from mechanical, analog chart recorders to digital recorders for our heat-treating machinery. We've been told also to consider web-based recorders that might help us with remote diagnoses. Do I give up any functionality with web-based versus today's digitals? What about software considerations?
Send us your comments, suggestions, or solutions for this problem. We’ll include it in the August 2006 issue and post it on ControlDesign.com. Send visuals if you’d like—a sketch is fine. E-mail us at [email protected]. Please include your company, location and title in the response.
Have a problem you’d like to pose to the readers? Send it along, too.

Check out "The Best Of" The Answer to Your Problems, where we list all published questions and answers.