Practical FPGA Programming in C (Prentice Hall Modern Semiconductor Design Series) (英語) ペーパーバック – 2005/4/22
Kindle 端末は必要ありません。無料 Kindle アプリのいずれかをダウンロードすると、スマートフォン、タブレットPCで Kindle 本をお読みいただけます。
High-performance FPGA-accelerated software applications are a growing demand in fields ranging from communications and image processing to biomedical and scientific computing. This text introduces powerful, C-based parallel-programming techniques for creating these applications, verifying them, and moving them into FPGA hardware.
David Pellerin is president and founder of Impulse Accelerated Technologies, a firm that serves systems designers who want to use FPGAs for hardware-based software acceleration and fast prototyping of mixed hardware/software systems. His Prentice Hall PTR books include VHDL Made Easy, Practical Design Using Programmable Logic, Digital Design Using ABEL, and Electronic Design Automation for Windows. Scott Thibault is president and founder of Green Mountain Computing Systems, developers of custom and OEM software that leverages advanced HDL and C-to-RTL expertise to improve time-to-market. Dr. Thibault holds a Ph.D. in computer science from the University of Rennes.
© Copyright Pearson Education. All rights reserved.
There are some problems with this book, however. It relies overwhelmingly on the Impulse C product, to the exclusion of Handel C and a flock of other products - it's really an Impulse C how-to. That's not necessarily a bad thing, but it's not what I assumed from the title. It emphasizes streaming data, like radar input, video, audio, or all the other traditional DSP applications of FPGAs. Streaming is good, but a poor match to the Cray and SGI coprocessors.
The biggest problems in this book come from the basic approach of trying to turn an FPGA into a CPU. Back when iron was first introduced for bridge-building, iron beams were built to imitate wooden ones. The result was a wooden bridge made of iron. It worked, but used far more material than was needed for the job, and got relatively poor performance from the material. Ditto what happens when FPGA logic goes into a soft CPU. The result is a little like the classic "Fortran program written in C," only worse. Andre deHon, in his FCCM `04 talk on hardware design patterns, identified the FPGA CPU as one of the biggest anti-patterns in his lexicon (though he didn't use the word anti-pattern). Creating a CPU makes the FPGA look familiar to a C programmer, but is a great way to turn the FPGA's inherent parallelism into serial execution, and far slower than the host CPU's at that.
The FPGA CPU re-introduces the "memory wall." A big Xilinx FPGA has 300-400 on-chip memories that can be accessed independently and concurrently. You can (I did) build a dual-ported RAM with 1000-bit words. You can (I did) create a 64-way interleave, so all data for a 3D tricubic interpolation can be accessed in one cycle. You can (I did) create scratch buffers for hundreds of concurrent computations. You can create all kinds of wild structures with massive performance - or you can reinvent the 16-bit von Neumann bottleneck. (Soft CPUs aren't inherently evil, there are good uses for them. Mostly, I'd rather use the same logic for 100 parallel, dedicated processing elements instead of one serial PE.)
If you need to use Impulse C, there's probably no other book around. If you're a programmer trying to learn about hardware, I suggest Wirth's aging "Digital Circuit Design for Computer Science Students." I recommend this book only to people with product-specific needs.
Impulse C is an extension to the traditional ANSI C programming language that permits development of FPGA hardware by writing C. Like any C-to-gates development tool, the resulting hardware design is inferior to what an experienced hardware designer could produce. However, many feel that the greatly reduced development time and effort of a C development environment is worth the performance trade-off. In many cases the resulting hardware runs significantly faster than software programs on a PC.
The CoDeveloper tools that come with Impulse C (they are not included with the book) compile C to FPGA hardware and, in the process, extract multiple types of parallelism. Contrary to what "weirdweird" says, the resulting designs do not suffer from traditional processor bottlenecks as the resulting designs are nothing like a processor. Hardware synthesized from Impulse C programs consists of a datapath controlled by a Finite State Machine, the same structure used in most hardware designs and one that is not found in processors.
In addition to any parallelism the user specifies through stream declarations, the Impulse C compiler can also perform loop unrolling and other optimizations to perform multiple operations in parallel. The tools also permit the simultaneous use of multiple memories internal to the FPGA, eliminating the "memory wall" to which the previous reviewer refers.
"weirdweird" is correct that this book focuses solely on Impulse C, so readers without potential access to the Impulse C tools might want to consider other choices.