Practical FPGA Programming in C

Overview

C-based techniques for building high-performance, FPGA-accelerated software applications

Circuits, Devices, and Systems

C-based Techniques for Optimizing FPGA Performance, Design Flexibility, and Time to Market

Forward written by Clive "Max" Maxfield.

High-performance FPGA-accelerated software applications are a growing demand in fields ranging from communications and image ...

See more details below
Paperback (New Edition)
$79.04
BN.com price
(Save 7%)$84.99 List Price
Other sellers (Paperback)
  • All (11) from $45.00   
  • New (7) from $61.36   
  • Used (4) from $45.00   
Sending request ...

Overview

C-based techniques for building high-performance, FPGA-accelerated software applications

Circuits, Devices, and Systems

C-based Techniques for Optimizing FPGA Performance, Design Flexibility, and Time to Market

Forward written by Clive "Max" Maxfield.

High-performance FPGA-accelerated software applications are a growing demand in fields ranging from communications and image processing to biomedical and scientific computing. This book introduces powerful, C-based parallel-programming techniques for creating these applications, verifying them, and moving them into FPGA hardware.

The authors bridge the chasm between "conventional" software development and the methods and philosophies of FPGA-based digital design. Software engineers will learn to look at FPGAs as "just another programmable computing resource," while achieving phenomenal performance because much of their code is running directly in hardware. Hardware engineers will master techniques that perfectly complement their existing HDL expertise, while allowing them to explore design alternatives and create prototypes far more rapidly. Both groups will learn how to leverage C to support efficient hardware/software co-design and improve compilation, debugging, and testing.

  • Understand when C makes sense in FPGA development and where it fits into your existing processes
  • Leverage C to implement software applications directly onto mixed hardware/software platforms
  • Execute and test the same C algorithms in desktop PC environments and in-system using embedded processors
  • Master new, C-based programming models and techniques optimized for highly parallel FPGA platforms
  • Supercharge performance by optimizing through automated compilation
  • Use multiple-process streaming programming models to deliver truly astonishing performance
  • Preview the future of FPGA computing
  • Study an extensive set of realistic C code examples

About the Web Site

Visit http://www.ImpulseC.com/practical to download fully operational, time-limited versions of a C-based FPGA design compiler, as well as additional examples and programming tips.

© Copyright Pearson Education. All rights reserved.

Read More Show Less

Product Details

Meet the Author

Author Bio

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.

Read More Show Less

Read an Excerpt

PrefacePreface

This is a book about software programming for FPGAs. To be more specific, this book is about using parallel programming techniques in combination with the C language to create FPGA-accelerated software applications.

We have written this book to help bridge the gap—the great chasm, in fact—that exists between software development methods and philosophies, and the methods and philosophies of FPGA-based digital design. We understand that as a result we may be writing for two quite different audiences: software application developers and digital hardware designers.

For software engineers, our goal is to present FPGAs as software-programmable computing resources. We hope to show that these devices, when programmed using appropriate methods, are not so different from other non-traditional computing platforms, such as DSPs. We will show, through example, that software development methods and software languages can be used in a practical way to create FPGA-based, high-performance computing applications, without a deep knowledge of hardware design.

For hardware designers our intent is similar, but with a caveat: we are not trying to replace your existing methods of design or suggest that the methods and tools described in this book represent a "next wave" of hardware engineering. After all, if you are an FPGA designer using VHDL or Verilog to create complex electronic systems, the title of this book, Practical FPGA Programming in C, may sound like an oxymoron. How can C, a software programming language, be a practical way to describe digital electronic hardware? The truth is, sometimes the explicit and precise descriptions offered by hardware description languages (HDLs) are essential to achieve designs goals. But, as you'll see, this explicit control over hardware is not always necessary. In the same way that you might first write software in C and then recode key portions in assembler, hardware designers can benefit from tools that allow them to mix high-level and low-level descriptions as needed to meet design goals as quickly as possible. Even when the entire hardware design will be eventually be recoded with a lower-level HDL, high-level design languages allow hardware engineers to rapidly explore the design space and create working prototypes.

So for you, the experienced hardware engineer, we'll state right up front that we agree with you. We do not believe that C and C++ (as used by legions of programmers worldwide) are practical replacements for VHDL, Verilog, or any other HDL. And we agree with you that C and C++ may not play a leading, or perhaps even significant, role as a design entry language for general-purpose ASIC and FPGA design, at least not as we know such design today. Nevertheless, we believe there is a place for C-based design in a hardware design flow. Still not convinced? Stay with us for a moment, and we'll explain.

C Language for FPGA-Based Hardware Design?

Let's think a bit more about the role of C—or lack of a role, as the case may be—in hardware design. Why is standard C not appropriate as a replacement for existing hardware design languages? Because any good programming language provides one important thing: a useful abstraction of its target. VHDL and Verilog (or, more precisely, the synthesizable subsets of these languages) succeed very well because they provide a rational, efficient abstraction of a certain class of hardware: level- and edge-sensitive registers with reset and clock logic, arbitrary logic gates, and somewhat larger clocked logic elements arranged in a highly parallel manner. All of today's FPGAs fit this pattern, and it is the pattern also found in the vast majority of today's ASIC designs, no matter how complex.

The standard C language does not provide that level of abstraction (which we call register transfer level, or RTL), so "C-based" languages for hardware could add RTL-like constructs in the form of syntax decorations, extra functions or keywords, compiler hints, and more to create some meaningful way of expressing parallelism and describing low-level hardware structures such as clocks and resets. But in this case we would just have another HDL with new syntax. On the other hand, without the benefit of RTL constructs such as these, the developers of C compilers for FPGAs and other nontraditional targets would face a nearly impossible problem: how to efficiently map algorithms and applications written for one class of processing target (the traditional microprocessor) to something entirely different (arbitrary logic gates and registers combined with somewhat higher-level logic structures). Nobody has yet figured out how to do that mapping from a pure software application with a reasonable level of efficiency, although we are getting better at it.

So why use C at all for FPGA design? There are significant advantages, including the potential for hardware-software codesign, for the creation of test benches written in C, and (if the modified C language supports it) the ability to compile and debug an FPGA application using a standard C development environment. And if a mid-level approach to hardware abstraction is taken—one that does not require that the programmer understand all the details of the hardware target, and yet is guided by the programming model toward more appropriate methods of coding—you can strike a balance between software design productivity and hardware design results, as measured in system performance and size.

Compelling Platforms for Software Acceleration

Here's where software developers come in. On the applications side there is an increasing trend toward using FPGAs as hardware accelerators for high-performance computing. Applications that demand such performance exist in many domains, including communications, image processing, streaming media, and other general-purpose signal processing. Many of these applications are in the embedded software space, while others represent scientific, biomedical, financial, and other larger-scale computing solutions.

When acceleration is required, these applications typically begin their lives as software models, often in C language, and are then manually rewritten and implemented in hardware using VHDL or Verilog. This manual conversion of software algorithms to hardware is a process that can be long and tedious in the extreme; hence, there is a strong demand for more rapid paths to working hardware. There is also a strong desire to avoid later redesigns of that hardware to reflect software algorithm updates. Automating the process of software-to-hardware conversion—at the very least for the purpose of creating hardware prototypes—is therefore highly compelling. This automation also brings hardware acceleration within reach of design teams and developers who do not have vast hardware design expertise, or where hardware design might be cost-prohibitive using traditional approaches. C-to-hardware compilation is an enabling technology that has the potential to open up hardware acceleration for a whole new class of applications and developers.

On the hardware side, there have been recent advances in FPGA-based programmable platforms that make FPGAs even more practical for use as application accelerators. In fact, FPGAs with embedded processor cores have now become cost-effective as replacements for entire embedded systems. The concept of building a complete "system on an FPGA" is finally a reality, thanks to the continued efforts of the major FPGA providers and third-party intellectual property (IP) suppliers. What is common about these new FPGA-based platforms is that they combine one or more general-purpose processor cores with a large amount of programmable logic. Just as significantly, they come equipped with substantial amounts of royalty-free, pretested components and an ever-growing collection of licensable third-party and open-source components that can be assembled on-chip in a matter of hours to create an amazingly diverse set of potential hardware/software processing platforms.

From a tools perspective, what is interesting about these new devices—and the new computing platforms they represent—is that they are flexible enough to support the use of methods and tools from the software development world, including traditional software debuggers. Using languages such as C and C++ in conjunction with software-to-hardware compilers makes it practical to implement software applications directly onto a mixed hardware/software platform.

It is here that FPGA designers who are questioning the use of software design languages and methods for FPGAs may be missing the point. C is not likely to replace HDLs such as VHDL and Verilog for traditional, general-purpose hardware design. C will, however, play a strong role in the kind of mixed hardware/software applications that are emerging today—applications in which the line between what is software and what is hardware is becoming increasingly blurred, and where the ability to rapidly prototype and experiment with implementation alternatives is critical.

In addition, because of the prevalence of embedded FPGA processors, the C language is already being used for FPGAs by thousands of software engineers. The problem is that the vast majority of these software engineers are only able to program for the embedded microprocessor within the FPGA. Our goal in this book is to make C-language programming applicable to the entire FPGA, not just the embedded microprocessor within it.

The Power to Experiment

Using C language programming as an aid to FPGA-based hardware design gives you the power to experiment—with alternate algorithmic approaches, with alternate hardware/software partitioning, and with alternate target platforms. Using the same design entry language, you now have the ability to evaluate your applications and their constituent algorithms using different hardware and software targets.

In this book we will show you how you can, for example, set up a test in which the same C-language algorithm can, with only minor modifications, be executed in a desktop computing environment (under the control of a C debugger such as found in Visual Studio, gbd, or Eclipse) for the purpose of functional simulation, be executed in-system on an embedded processor, and be compiled directly to an FPGA as dedicated hardware. Using this approach, fundamentally different computing alternatives can be tried, and alternative hardware/software partitioning strategies can be evaluated. As you'll see, this power to quickly generate and experiment with hardware/software prototypes is the key advantage of using software-based methods and tools for FPGAs.

How This Book Is Organized

For software and hardware developers, we present important background information about FPGA devices, their history, and the types of tools available for them, and we also survey some of the available FPGA-based computing platforms.

After setting the stage, we then present a method of programming, using the C language, and a programming model that is appropriate for use with highly parallel programmable hardware platforms. This programming model is somewhat different from traditional, more procedural C-language programming but is easy for experienced software engineers to pick up and use.

From that foundation we then move into a series of examples, all written in C, that demonstrate how to take advantage of the massive levels of parallelism that are available in an FPGA-based platform. We will describe software coding techniques that allow better optimization of C-language statements by automated compiler tools. These techniques are not difficult to understand but can have dramatic impacts on the performance of an FPGA application.

Later chapters present examples of how a streaming programming model can be used to create even higher levels of performance. Using amultiple-process streaming programming model can result in truly astonishing levels of performance with relatively little effort, but to the traditional C programmer the methods used to achieve such levels of performance may be somewhat new and different.

Where This Book Came From

This book, like many projects in the real world, began its life as a prototype, one that had been taken off the shelf, fiddled with, and put back repeatedly over a number of years. In its initial conception—long before the grueling, months-long process to create the book you now hold—the book was to have a different title and quite a different emphasis—on reconfigurable hardware platforms, both FPGA-based and non-FPGA-based. That book—the one that didn't get written but that survives in bits and pieces in certain chapters of this book—was conceived as a follow-on to an earlier book on programmable logic devices authored by David Pellerin and Michael Holley and titled Practical Design Using Programmable Logic (Prentice Hall, 1991).

When the idea for such a book was presented to Bernard Goodwin at Prentice Hall, his initial response was "But of course!" (It is the nature of acquisitions editors, we suppose, to be enthusiastic about every project prior to actually seeing the awful sludge of the first sample chapters.) As we worked on refining the proposal, Bernard suggested that we increase the emphasis on one particular area, an area of which we—due to our current roles in a technology startup—might have a greater-than-usual understanding. Hence the emphasis on C programming for FPGAs and on the design and optimization of parallel applications for FPGA targets. Bernard was, of course, eyeing the bottom line and steering us in a direction that would maximize sales (C is popular and FPGAs are popular; ergo, we will attract more readers by having both terms in the title). What Bernard did not know—what none of us know, really—is how widely C programming for FPGAs can and will be accepted. Time will tell, of course. With this book we hope to convince you that such an approach is indeed a practical one.

David Pellerin Kirkland, Washington

Scott Thibault Colchester, Vermont

© Copyright Pearson Education. All rights reserved.

Read More Show Less

Table of Contents

Foreword by Clive "Max" Maxfield.

Why is this book of interest to the hardware folks?

And what about the software guys and gals?

So what's the catch?

Preface.

C Language for FPGA-Based Hardware Design?

Compelling Platforms for Software Acceleration.

The Power to Experiment.

How This Book Is Organized.

Where This Book Came From.

Acknowledgments/

1. The FPGA as a Computing Platform.

A Quick Introduction to FPGAs.

FPGA-Based Programmable Hardware Platforms.

Increasing Performance While Lowering Costs.

The Role of Tools.

The FPGA as an Embedded Software Platform.

The Importance of a Programming Abstraction.

When Is C Language Appropriate for FPGA Design?

How to Use This Book.

2. A Brief History of Programmable Platforms.

The Origins of Programmable Logic.

Reprogrammability, HDLs, and the Rise of the FPGA.

Systems on a Programmable Chip.

FPGAs for Parallel Computing.

Summary.

3. A Programming Model for FPGA-Based Applications.

Parallel Processing Models.

FPGAs as Parallel Computing Machines.

Programming for Parallelism.

Communicating Process Programming Models.

The Impulse C Programming Model.

Summary.

4. An Introduction to Impulse C.

The Motivation Behind Impulse C.

The Impulse C Programming Model.

A Minimal Impulse C Program.

Processes, Streams, Signals, and Memory.

Impulse C Signed and Unsigned Datatypes.

Understanding Processes.

Understanding Streams.

Using Output Streams.

Using Input Streams.

Avoiding Stream Deadlocks.

Creating and Using Signals.

Understanding Registers.

Using Shared Memories.

Memory and Stream Performance Considerations.

Summary.

5. Describing a FIR Filter.

Design Overview.

The FIR Filter Hardware Process.

The Software Test Bench.

Desktop Simulation.

Application Monitoring.

Summary.

6. Generating FPGA Hardware.

The Hardware Generation Flow.

Understanding the Generated Structure.

Stream and Signal Interfaces.

Using HDL Simulation to Understand Stream Protocols.

Debugging the Generated Hardware.

Hardware Generation Notes.

Making Efficient Use of the Optimizers.

Language Constraints for Hardware Processes.

Summary.

7. Increasing Statement-Level Parallelism.

A Model of FPGA Computation.

C Language Semantics and Parallelism.

Exploiting Instruction-Level Parallelism.

Limiting Instruction Stages.

Unrolling Loops.

Pipelining Explained.

Summary.

8. Porting a Legacy Application to Impulse C.

The Triple-DES Algorithm.

Converting the Algorithm to a Streaming Model.

Performing Software Simulation.

Compiling to Hardware.

Preliminary Hardware Analysis.

Summary.

9. Creating an Embedded Test Bench.

A Mixed Hardware and Software Approach.

The Embedded Processor as a Test Generator.

The Role of Hardware Simulators.

Testing the Triple-DES Algorithm in Hardware.

Software Stream Macro Interfaces.

Building the Test System.

Summary.

10. Optimizing C for FPGA Performance.

Rethinking an Algorithm for Performance.

Refinement 1: Reducing Size by Introducing a Loop.

Refinement 2: Array Splitting.

Refinement 3: Improving Streaming Performance.

Refinement 4: Loop Unrolling.

Refinement 5: Pipelining the Main Loop.

Summary.

11. Describing System-Level Parallelism.

Design Overview.

Performing Desktop Simulation.

Refinement 1: Creating Parallel 8-Bit Filters.

Refinement 2: Creating a System-Level Pipeline.

Moving the Application to Hardware.

Summary.

12. Combining Impulse C with an Embedded Operating System.

The uClinux Operating System.

A uClinux Demonstration Project.

Summary.

13. Mandelbrot Image Generation.

Design Overview.

Expressing the Algorithm in C.

Creating a Fixed-Point Equivalent.

Creating a Streaming Version.

Parallelizing the Algorithm.

Future Refinements.

Summary.

14. The Future Of FPGA Computing.

The FPGA as a High-Performance Computer.

The Future of FPGA Computing.

Summary.

Appendix A. Getting the Most Out of Embedded FPGA Processors.

FPGA Embedded Processor Overview.

Peripherals and Memory Controllers.

Increasing Processor Performance.

Optimization Techniques That Are Not FPGA-Specific.

FPGA-Specific Optimization Techniques.

Summary.

Appendix B. Creating a Custom Stream Interface.

Application Overview.

The DS92LV16 Serial Link for Data Streaming.

Stream Interface State Machine Description.

Data Transmission.

Summary.

Appendix C. Impulse C Function Reference.

Appendix D. Triple-Des Source Listings.

Appendix E. Image Filter Listings.

Appendix F. Selected References.

Index.

Read More Show Less

Preface

Preface

This is a book about software programming for FPGAs. To be more specific, this book is about using parallel programming techniques in combination with the C language to create FPGA-accelerated software applications.

We have written this book to help bridge the gap—the great chasm, in fact—that exists between software development methods and philosophies, and the methods and philosophies of FPGA-based digital design. We understand that as a result we may be writing for two quite different audiences: software application developers and digital hardware designers.

For software engineers, our goal is to present FPGAs as software-programmable computing resources. We hope to show that these devices, when programmed using appropriate methods, are not so different from other non-traditional computing platforms, such as DSPs. We will show, through example, that software development methods and software languages can be used in a practical way to create FPGA-based, high-performance computing applications, without a deep knowledge of hardware design.

For hardware designers our intent is similar, but with a caveat: we are not trying to replace your existing methods of design or suggest that the methods and tools described in this book represent a "next wave" of hardware engineering. After all, if you are an FPGA designer using VHDL or Verilog to create complex electronic systems, the title of this book, Practical FPGA Programming in C, may sound like an oxymoron. How can C, a software programming language, be a practical way to describe digital electronic hardware? The truth is, sometimes the explicit and precise descriptions offered by hardware description languages (HDLs) are essential to achieve designs goals. But, as you'll see, this explicit control over hardware is not always necessary. In the same way that you might first write software in C and then recode key portions in assembler, hardware designers can benefit from tools that allow them to mix high-level and low-level descriptions as needed to meet design goals as quickly as possible. Even when the entire hardware design will be eventually be recoded with a lower-level HDL, high-level design languages allow hardware engineers to rapidly explore the design space and create working prototypes.

So for you, the experienced hardware engineer, we'll state right up front that we agree with you. We do not believe that C and C++ (as used by legions of programmers worldwide) are practical replacements for VHDL, Verilog, or any other HDL. And we agree with you that C and C++ may not play a leading, or perhaps even significant, role as a design entry language for general-purpose ASIC and FPGA design, at least not as we know such design today. Nevertheless, we believe there is a place for C-based design in a hardware design flow. Still not convinced? Stay with us for a moment, and we'll explain.

C Language for FPGA-Based Hardware Design?

Let's think a bit more about the role of C—or lack of a role, as the case may be—in hardware design. Why is standard C not appropriate as a replacement for existing hardware design languages? Because any good programming language provides one important thing: a useful abstraction of its target. VHDL and Verilog (or, more precisely, the synthesizable subsets of these languages) succeed very well because they provide a rational, efficient abstraction of a certain class of hardware: level- and edge-sensitive registers with reset and clock logic, arbitrary logic gates, and somewhat larger clocked logic elements arranged in a highly parallel manner. All of today's FPGAs fit this pattern, and it is the pattern also found in the vast majority of today's ASIC designs, no matter how complex.

The standard C language does not provide that level of abstraction (which we call register transfer level, or RTL), so "C-based" languages for hardware could add RTL-like constructs in the form of syntax decorations, extra functions or keywords, compiler hints, and more to create some meaningful way of expressing parallelism and describing low-level hardware structures such as clocks and resets. But in this case we would just have another HDL with new syntax. On the other hand, without the benefit of RTL constructs such as these, the developers of C compilers for FPGAs and other nontraditional targets would face a nearly impossible problem: how to efficiently map algorithms and applications written for one class of processing target (the traditional microprocessor) to something entirely different (arbitrary logic gates and registers combined with somewhat higher-level logic structures). Nobody has yet figured out how to do that mapping from a pure software application with a reasonable level of efficiency, although we are getting better at it.

So why use C at all for FPGA design? There are significant advantages, including the potential for hardware-software codesign, for the creation of test benches written in C, and (if the modified C language supports it) the ability to compile and debug an FPGA application using a standard C development environment. And if a mid-level approach to hardware abstraction is taken—one that does not require that the programmer understand all the details of the hardware target, and yet is guided by the programming model toward more appropriate methods of coding—you can strike a balance between software design productivity and hardware design results, as measured in system performance and size.

Compelling Platforms for Software Acceleration

Here's where software developers come in. On the applications side there is an increasing trend toward using FPGAs as hardware accelerators for high-performance computing. Applications that demand such performance exist in many domains, including communications, image processing, streaming media, and other general-purpose signal processing. Many of these applications are in the embedded software space, while others represent scientific, biomedical, financial, and other larger-scale computing solutions.

When acceleration is required, these applications typically begin their lives as software models, often in C language, and are then manually rewritten and implemented in hardware using VHDL or Verilog. This manual conversion of software algorithms to hardware is a process that can be long and tedious in the extreme; hence, there is a strong demand for more rapid paths to working hardware. There is also a strong desire to avoid later redesigns of that hardware to reflect software algorithm updates. Automating the process of software-to-hardware conversion—at the very least for the purpose of creating hardware prototypes—is therefore highly compelling. This automation also brings hardware acceleration within reach of design teams and developers who do not have vast hardware design expertise, or where hardware design might be cost-prohibitive using traditional approaches. C-to-hardware compilation is an enabling technology that has the potential to open up hardware acceleration for a whole new class of applications and developers.

On the hardware side, there have been recent advances in FPGA-based programmable platforms that make FPGAs even more practical for use as application accelerators. In fact, FPGAs with embedded processor cores have now become cost-effective as replacements for entire embedded systems. The concept of building a complete "system on an FPGA" is finally a reality, thanks to the continued efforts of the major FPGA providers and third-party intellectual property (IP) suppliers. What is common about these new FPGA-based platforms is that they combine one or more general-purpose processor cores with a large amount of programmable logic. Just as significantly, they come equipped with substantial amounts of royalty-free, pretested components and an ever-growing collection of licensable third-party and open-source components that can be assembled on-chip in a matter of hours to create an amazingly diverse set of potential hardware/software processing platforms.

From a tools perspective, what is interesting about these new devices—and the new computing platforms they represent—is that they are flexible enough to support the use of methods and tools from the software development world, including traditional software debuggers. Using languages such as C and C++ in conjunction with software-to-hardware compilers makes it practical to implement software applications directly onto a mixed hardware/software platform.

It is here that FPGA designers who are questioning the use of software design languages and methods for FPGAs may be missing the point. C is not likely to replace HDLs such as VHDL and Verilog for traditional, general-purpose hardware design. C will, however, play a strong role in the kind of mixed hardware/software applications that are emerging today—applications in which the line between what is software and what is hardware is becoming increasingly blurred, and where the ability to rapidly prototype and experiment with implementation alternatives is critical.

In addition, because of the prevalence of embedded FPGA processors, the C language is already being used for FPGAs by thousands of software engineers. The problem is that the vast majority of these software engineers are only able to program for the embedded microprocessor within the FPGA. Our goal in this book is to make C-language programming applicable to the entire FPGA, not just the embedded microprocessor within it.

The Power to Experiment

Using C language programming as an aid to FPGA-based hardware design gives you the power to experiment—with alternate algorithmic approaches, with alternate hardware/software partitioning, and with alternate target platforms. Using the same design entry language, you now have the ability to evaluate your applications and their constituent algorithms using different hardware and software targets.

In this book we will show you how you can, for example, set up a test in which the same C-language algorithm can, with only minor modifications, be executed in a desktop computing environment (under the control of a C debugger such as found in Visual Studio, gbd, or Eclipse) for the purpose of functional simulation, be executed in-system on an embedded processor, and be compiled directly to an FPGA as dedicated hardware. Using this approach, fundamentally different computing alternatives can be tried, and alternative hardware/software partitioning strategies can be evaluated. As you'll see, this power to quickly generate and experiment with hardware/software prototypes is the key advantage of using software-based methods and tools for FPGAs.

How This Book Is Organized

For software and hardware developers, we present important background information about FPGA devices, their history, and the types of tools available for them, and we also survey some of the available FPGA-based computing platforms.

After setting the stage, we then present a method of programming, using the C language, and a programming model that is appropriate for use with highly parallel programmable hardware platforms. This programming model is somewhat different from traditional, more procedural C-language programming but is easy for experienced software engineers to pick up and use.

From that foundation we then move into a series of examples, all written in C, that demonstrate how to take advantage of the massive levels of parallelism that are available in an FPGA-based platform. We will describe software coding techniques that allow better optimization of C-language statements by automated compiler tools. These techniques are not difficult to understand but can have dramatic impacts on the performance of an FPGA application.

Later chapters present examples of how a streaming programming model can be used to create even higher levels of performance. Using amultiple-process streaming programming model can result in truly astonishing levels of performance with relatively little effort, but to the traditional C programmer the methods used to achieve such levels of performance may be somewhat new and different.

Where This Book Came From

This book, like many projects in the real world, began its life as a prototype, one that had been taken off the shelf, fiddled with, and put back repeatedly over a number of years. In its initial conception—long before the grueling, months-long process to create the book you now hold—the book was to have a different title and quite a different emphasis—on reconfigurable hardware platforms, both FPGA-based and non-FPGA-based. That book—the one that didn't get written but that survives in bits and pieces in certain chapters of this book—was conceived as a follow-on to an earlier book on programmable logic devices authored by David Pellerin and Michael Holley and titled Practical Design Using Programmable Logic (Prentice Hall, 1991).

When the idea for such a book was presented to Bernard Goodwin at Prentice Hall, his initial response was "But of course!" (It is the nature of acquisitions editors, we suppose, to be enthusiastic about every project prior to actually seeing the awful sludge of the first sample chapters.) As we worked on refining the proposal, Bernard suggested that we increase the emphasis on one particular area, an area of which we—due to our current roles in a technology startup—might have a greater-than-usual understanding. Hence the emphasis on C programming for FPGAs and on the design and optimization of parallel applications for FPGA targets. Bernard was, of course, eyeing the bottom line and steering us in a direction that would maximize sales (C is popular and FPGAs are popular; ergo, we will attract more readers by having both terms in the title). What Bernard did not know—what none of us know, really—is how widely C programming for FPGAs can and will be accepted. Time will tell, of course. With this book we hope to convince you that such an approach is indeed a practical one.

David Pellerin
Kirkland, Washington

Scott Thibault
Colchester, Vermont

© Copyright Pearson Education. All rights reserved.

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)