Re: FPGA C Compiler on sourceforge.net (TMCC derivative)
- From: Martin Ellis <me_ncl@xxxxxxxxxxx>
- Date: Thu, 03 Nov 2005 19:32:04 +0000
Jim Granville wrote:
> I like this oxymoron, on p5 :
> " * Companies create proprietary ANSI C-based language
> * Languages do not have all ANSI C features
I don't think that's an oxymoron. Just because a language is proprietary,
it does not mean it can't be based on ANSI C.
Sure it might read a bit funny - but we've all tried to cram too much onto
slides before.
> and this very important point
> * Must adhere to specific programming ?style? for maximum optimization
Yes. That's a very important point.
> The benchmarks are usefull - and show the choice is very much a lottery.
> One benchmark they did not give, was just what results were if Generic
> C, from a generic graduate, was thrown at these tools.
I think you've got the wrong end of the stick there.
This isn't about taking arbitrary C code and compiling it to an FPGA.
You simply can't do that.
Reason: It's possible to write architecture specific code (that is, code
specific to a particular ISA) in C. Self-modifying code and dynamic code
generation are examples of this.
For example, linkers and JIT compilers modify code which is then executed.
You couldn't compile that efficiently to an FPGA - it would need the
re-synthesis every time code was modified..
Another reason is that a compiler can't guess which inner loops are program
'hot-spots', and thus good candidates for synthesis. Such information is
application-domain specific.
Concisely: the aim isn't to be able to take a program written by someone
who knows nothing about hardware (at least, not yet). The aim is to be
able to develop hardware acceleration for a given algorithm.
One advantage of C-based languages is that when trying to accelerate an
algorithm, it might not be clear which parts to synthesise - this requiring
some trial-and-error for difficult problems, and also being dependent on
some rather arbitrary parameters. It's easier to move a computation unit
from software to hardware, or vice-versa, if the languages are similar.
There's also a whole raft of software based optimisations that can be
applied before the hardware optimisations even get a look in.
Another, is that for some projects, a C simulation is developed to check the
algorithms anyway. For example, Timothy Miller did a software model for
the OpenGraphics project. The practise isn't uncommon.
> Source snippets are important, because these solutions are not C, but
> C-based. The devil is in the details....
For the reasons above, it is - in general - necessary to provide a compiler
with some pragmas or other hints that describe what code would be a good
candidate for synthesis.
However, the solutions are often close enough to C that it's possible to
execute the program entirely in software, as well as compile to a
object code/bitstream target. That's useful for the intended applications.
Nobody's pretending C-based synthesis is a complete replacement for HDL,
only that for some applications/projects it's a very compelling
alternative.
Martin
.
- Follow-Ups:
- Re: FPGA C Compiler on sourceforge.net (TMCC derivative)
- From: air_bits
- Re: FPGA C Compiler on sourceforge.net (TMCC derivative)
- References:
- FPGA C Compiler on sourceforge.net (TMCC derivative)
- From: air_bits
- Re: FPGA C Compiler on sourceforge.net (TMCC derivative)
- From: Rene Tschaggelar
- Re: FPGA C Compiler on sourceforge.net (TMCC derivative)
- From: air_bits
- Re: FPGA C Compiler on sourceforge.net (TMCC derivative)
- From: Eric Smith
- Re: FPGA C Compiler on sourceforge.net (TMCC derivative)
- From: air_bits
- Re: FPGA C Compiler on sourceforge.net (TMCC derivative)
- From: Jim Granville
- Re: FPGA C Compiler on sourceforge.net (TMCC derivative)
- From: Martin Ellis
- Re: FPGA C Compiler on sourceforge.net (TMCC derivative)
- From: Jim Granville
- FPGA C Compiler on sourceforge.net (TMCC derivative)
- Prev by Date: Re: FPGA C Compiler on sourceforge.net (TMCC derivative)
- Next by Date: Re: FPGA C Compiler on sourceforge.net (TMCC derivative)
- Previous by thread: Re: FPGA C Compiler on sourceforge.net (TMCC derivative)
- Next by thread: Re: FPGA C Compiler on sourceforge.net (TMCC derivative)
- Index(es):
Relevant Pages
|