[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [oc] C to HDL? Didn't realise the situation was that bad



I have a little squeak to make about this. A picky little point for sure.
The point is that these tools do not technically permit you to program the
FPGAs in C. Instead, by following specific guidelines and using well crafted
#define macros you can use a C (C++) language subset to produce a common
source for use in both simulation and programming of the FPGA. In other
words. These are new languages that can be constructed using the C/C++
compilers.

You could probably do this as effectively using MASM or TASM macros as you
can in C. Using C++ might give you some advantage with the ability to
overload operators.

Also, the source format of some of the coding examples I've seen here are
not following C/C++ rules. I've seen examples of

    ...
    OUT1 = IN1;
    OUT2 = IN2;
    ...

Whereas to be technically correct in C or C++ this should be

    ...
    OUT1 = IN1,
    OUT2 = IN2,
    ...

Note the use of comma "," instead of semicolon ";". In C/C++ statements
occur in the logical order that is equivalent to the order in which they are
written. When using semicolon you specify a logical order of sequence of
operation. When using comma you specify that the operations _logically_
appear to occur at the same time but can be ordered arbitrarily.

The impression that you use C to program leads to most of the common
mistakes for programmers. i.e. using an output signal for working variable
and input later in body of block.

My 2 cents worth.

Good luck on your C for FPGA project.

Jim Dempsey


----- Original Message -----
From: "Paul McFeeters" <paul.mcfeeters@ntlworld.com>
To: <cores@opencores.org>
Sent: Thursday, December 13, 2001 2:14 PM
Subject: [oc] C to HDL? Didn't realise the situation was that bad


> Hi,
>
> gotta laugh egh? You would think that more people using C/C++ to program
FPGAs would be welcomed?
> I can only find 3 C to VHDL programs on the net (if you know of more
please tell me), the prices
> are as follows:
>
> Celoxica limited, $25,000 every year
>
> CLevelDesign, $95,000 one off payment (actually C++)
>
> Adelante Technologies, no sign of prices on their website but might have
to sit down to hear it?
>
>
> I looked at www.systemc.org, supposed to be an organisation to promote the
widespread adoption
> of SystemC being used to program hardware. Great I thought, like minded
people, then I saw their
> prices!
>
> Individual Members - $2,000 USD
> Corporate Members - $50,000 USD
>
> If they think I am going to pay them $2,000 a year just to join their
little website they can take
> a long running jump off a short cliff. I was going to include support for
SystemC in my program but
> if I have to pay $2,000 to even be a member of SystemC they can forget
about it. I can't afford to
> join their private club.
>
> On the plus side my own translator is going great guns. Finished the first
section in 2 days, had
> originally expected 2 weeks but having a lull in work at moment so more
spare time to invest. Should
> have demonstration executable hopefully by start of the new year. I had
forgotten how much fun it is
> to write compilers, like a kid with a new toy now. ;-)
>
> Paul McFeeters
> Self appointed C for FPGA champion (well foot soldier anyway)
>
>
> --
> To unsubscribe from cores mailing list please visit
http://www.opencores.org/mailinglists.shtml
>

--
To unsubscribe from cores mailing list please visit http://www.opencores.org/mailinglists.shtml