Jump to content


ANSI C to VHDL in FPGAs


  • You cannot reply to this topic
3 replies to this topic

#1 ramoreira

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 25 May 2005 - 09:58 AM

I have doubts! First, I will try explain our project for you.

The purpose of our work is to implement a hardware of a video transcodificador which must realize a reduction (in real time) of the video rate initially compressed with MPEG2 technology in a H.264 stream, enabling the conversion of a HDTV stream in a SDTV.

This implementation must be done compliant with ANSI C language. This code will be implemented by Universities which are our partners in this project.

The processing of this design will take a lot of work, once our job is to implement the solution in hardware, using FPGAs.

IMPORTANT: Now, our first problem is how to translate ANSI C code to VHDL in FPGAs? Is Impulse C a solutions for our problem?

Is Impulse C similar with System C? Whether Is Impulse C a software that convert ANSI C to VHDL in FPGAs?

#2 RalphBodenner

    Advanced Member

  • Admin
  • PipPipPip
  • 348 posts

Posted 26 May 2005 - 10:55 AM

In short, Impulse C is designed for projects like yours. It can help you translate C programs into VHDL for FPGAs.

Impulse C has two main parts:

1) an ANSI C library that helps you express your design as a collection of processes communicating over streams

2) a optimizing C-to-RTL compiler that translates your program written using #1 and turns it into an RTL representation suitable for synthesis to an FPGA target

It's not feasible to just take a pile of C code, run it through the compiler, and expect it to work or to perform well in the FPGA fabric. Your code will have to use the Impulse C library functions and will have to be structured into functions that represent independent parts of your application. The compiler understands how to convert both the Impulse C library calls (used for interprocess communication) and plain C (the bulk of your algorithms) into HDL.

CoDeveloper, the Impulse C development environment, provides desktop simulation and profiling tools to aid in verification of the design before it is translated to hardware. Impulse C can be debugged in any C debugger or IDE (Visual Studio, Eclipse, gdb, etc.). The HDL for all the generated components and interface libraries is unencrypted and readily debugged in an HDL simulator. We will soon be releasing a tool that will let you debug a cycle-accurate C translation of your original code.

Impulse C is much simpler than SystemC, which is C++, not ANSI C. Both are libraries, not new languages, but Impulse C is a very small API compared to SystemC.
Ralph Bodenner
Impulse Accelerated Technologies, Inc.

#3 ramoreira

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 30 May 2005 - 04:53 AM

In our case,

We must use part 2 of Impulse C?

Then, in our design, we have on code ANSI C.
Could you explain how we must to make for translate one code in ANSI C to HDL?

Tks,
Rodrigo




QUOTE (RalphBodenner @ May 26 2005, 10:55 AM)
In short, Impulse C is designed for projects like yours.  It can help you translate C programs into VHDL for FPGAs.

Impulse C has two main parts:

1) an ANSI C library that helps you express your design as a collection of processes communicating over streams

2) a optimizing C-to-RTL compiler that translates your program written using #1 and turns it into an RTL representation suitable for synthesis to an FPGA target

It's not feasible to just take a pile of C code, run it through the compiler, and expect it to work or to perform well in the FPGA fabric.  Your code will have to use the Impulse C library functions and will have to be structured into functions that represent independent parts of your application.  The compiler understands how to convert both the Impulse C library calls (used for interprocess communication) and plain C (the bulk of your algorithms) into HDL.

CoDeveloper, the Impulse C development environment, provides desktop simulation and profiling tools to aid in verification of the design before it is translated to hardware.  Impulse C can be debugged in any C debugger or IDE (Visual Studio, Eclipse, gdb, etc.).  The HDL for all the generated components and interface libraries is unencrypted and readily debugged in an HDL simulator.  We will soon be releasing a tool that will let you debug a cycle-accurate C translation of your original code.

Impulse C is much simpler than SystemC, which is C++, not ANSI C.  Both are libraries, not new languages, but Impulse C is a very small API compared to SystemC.


#4 RalphBodenner

    Advanced Member

  • Admin
  • PipPipPip
  • 348 posts

Posted 31 May 2005 - 09:31 AM

QUOTE (ramoreira @ May 30 2005, 05:53 AM)
In our case,

We must use part 2 of Impulse C?

Then, in our design, we have on code ANSI C.
Could you explain how we must to make for translate one code in ANSI C to HDL?

Tks,
Rodrigo


In your case, you'd use both parts. First, you'd use Impulse C library functions (#1) in the Impulse C version of the original program. Next, you'd compile the Impulse C program into VHDL using #2. #1 and #2 are part of the same product: CoDeveloper.

Converting a legacy ANSI C program, written without parallelism in mind, into an Impulse C program is not difficult in general. Writing Impulse C is like using a thread library, where you structure your code in certain ways and make certain function calls to create a parallel model of your system. The compiler (#2) has certain limitations on the C input it can convert to hardware, but these limitations are well-documented and can be worked around.
Ralph Bodenner
Impulse Accelerated Technologies, Inc.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users