Chapter4.An Introduction to Impulse C


Chapter 4. An Introduction to Impulse C

The programming examples presented in the remainder of this book are written using Impulse C, a function library and related compiler and debugging tools provided by Impulse Accelerated Technologies. These libraries and tools are compatible with standard ANSI C and with standard C development tools such as Microsoft Visual Studio and gcc.

Impulse C supports the development of highly parallel, mixed hardware/software algorithms and applications using the communicating process programming model described in the preceding chapter. The features of Impulse C for expressing parallelism at a system level are similar to features found in other C-based languages for hardware and mixed hardware/software design, including Celoxica's Handel-C and SystemC. This means that the concepts we will describe in this and subsequent chapters are applicable to different C-based FPGA design environments and are in fact useful even if you are developing FPGA applications using some other method of design.

In the preface to this book we stated that C language programming is not a replacement for proven methods of hardware design using hardware description languages. Impulse C can be used to describe a wide variety of functions that are appropriate for compiling to FPGA hardware, but it is not intended for describing low-level hardware structures. Nor is it intended for converting large, monolithic C applications, which typically consist of many C subroutines that are invoked via remote procedure calls.

Where did Impulse C originate?

Impulse C has its philisophical roots in research carried out at Los Alamos National Laboratories under the direction of Dr. Maya Gokhale. This research, which culminated in the publicly available Streams-C compiler (www.streams-c.lanl.gov), provided a method of expressing applications for implementation on FPGA-based, board-level platforms for the purpose of high-performance, hardware- accelerated computing. Applications developed using Streams-C have been in the domains of data encryption, image processing, astrophysics, and others.

Impulse C borrows its programming model and general philosophy from the Streams-C programming environment but differs from Streams-C in a number of respects, the most important being its focus on maintaining compatibility with standard C programming environments. By using the Impulse C libraries it's possible to describe applications consisting of many (perhaps hundreds) of communicating processes and simulate their collective behavior using standard C development tools including Microsoft Visual Studio and gccand gdb-based environments.

To allow the compilation and simulation of highly parallel applications consisting of independently synchronized processes, the Impulse C libraries include functions that define process interconnections (typically streams and/or signals) and emulate the behavior of multiple processes (for the purpose of desktop simulation) using threads.

Monitoring functions included with the Impulse C library allow specific processes in a large, parallel application to be instrumented with special debugging functions. The results of computations are displayed in multiple windowed views, most often while the application is running under the control of a standard C debugger. This capability is introduced in this chapter and is described in more detail in subsequent chapters.

For hardware generation, the Impulse tools include a C language compiler flow that is based in part on the publicly available SUIF (Stanford Universal Intermediate Format) tools, which are combined with proprietary optimization and code generation tools developed at Impulse Accelerated Technologies.


The Impulse C tools include a software-to-hardware compiler that converts individual Impulse C processes to functionally equivalent hardware descriptions and that generates the necessary process-to-process interface logic. While this C-to-hardware compilation is an enormous time-saver, it is still up to you, as the application developer, to make use of the tools, the Impulse C libraries, and an appropriate multiprocess programming model to effectively develop applications appropriate for these new categories of programmable hardware platforms. In the examples and tutorials included in this and later chapters, we'll show you how.



    Practical FPGA Programming in C
    Practical FPGA Programming in C
    ISBN: 0131543180
    EAN: 2147483647
    Year: 2005
    Pages: 208

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net