Jan 08 Feature
Jan 08 Feature
Jan 08 Feature
Introduction
This article is a discussion of FPGA technology, written for people that are
new to this chip architecture. The following sections will discuss what
FPGA chips are, why they can make software run faster, when they can't,
and how much work is involved in making programs run on FPGA chips.
We won't attempt to go into all of the technical details, but rather intend
to give the flavor of what is involved in an FPGA development project.
However, individuals considering embarking on their first FPGA
development project should be well served by considering the
information presented here before they begin.
What is an FPGA?
FPGA chips can also be used to make computer programs run much
faster. Consider a case in which a computer program spends a very large
amount of time calling one specific function with different pieces of data.
A circuit could be designed to perform that function. When the program
starts a hundred copies of that circuit could be flashed onto the FPGA
chip. When the program runs, it will use the FPGA to perform that critical
function, and run as fast as it would run on a hundred computers at
once. In some cases, the performance improvement from utilizing FPGAs
can be a thousand fold or more.
If your program spends 90% of the time executing 200 lines of code or less, it
might be a good candidate for FPGAs.
This article already touched on the idea of running many copies of the
circuit in parallel. This is because the FPGA chips actually run significantly
slower than the typical computer processor. There is also an additional
overhead of flashing the FPGA circuits at the beginning of the job. There
may be some bottlenecks moving data onto and off of the FPGA chip as
well. Of course, the FPGA chip itself costs money. Lastly, the biggest cost
involved in getting a piece of software to use FPGAs is the labor required
to reprogram the software. The metric of wanting to fit 100 copies or
more of a function on the FPGA chip is a rough metric for estimating
whether the performance gain will be enough to offset all of these other
issues.
Programming FPGAs
There are simulator programs that can use the VHDL to run a simulation
of how the chip will behave. Unfortunately, the simulators aren't 100%
reliable. The fact that the chip seems to run in the simulator doesn't
guarantee that it will run on the physical chip. In some cases, these
problems can be alleviated by using only 80% of the real estate on the
FPGA chip to leave a margin for error. One way to improve chip
utilization is to use an analysis system (analogous to testing every
junction on the chip with an oscilloscope) to identify and adjust for
problems. Most FPGA chips also have some pre-made circuits that can be
utilized to do common tasks.
The step past VHDL in terms of usability are some more advanced
programming tools that are available. Examples are Impulse C,
Starbridge, and the Mitrion Software Development Kit. These tools allow
the FPGA developer to work in a more C like environment, or even from
graphic interfaces. However, they are not complete C compilers. Thus
you can't just recompile C programs, or link against C libraries. These
tools can be very useful for FPGA development, but the person using
them still needs to have a solid understanding of the FPGA architecture
and circuit design.
There are various models of FPGA chip. VHDL and the other
programming utilities go a long way towards having a portable code.
However, there can still be issues associated with moving code to
different chip models. If the code has been written to utilize features of a
specific model FPGA chip, it may give better performance, but be harder
to port to other chips. Because the FPGA code is so intimately tied to the
hardware, there tend to be more FPGA portability issues (even between
chips from the same company) than are seen with conventional
computer programs.
Conclusions
References
Mitrion http://www.mitrion.com
Starbridge http://www.starbridgesystems.com/