Converting C/C++ to VHDL

7 views
Skip to first unread message

Dale How

unread,
Aug 23, 2001, 1:14:16 PM8/23/01
to
Hi,

Is this at all possible and if it is so can anyone recommend which packages
do it well and where I can get them?

Thanks
Dale


Alan Fitch

unread,
Aug 24, 2001, 4:59:52 AM8/24/01
to
In article <9m3di8$jcn$1...@news.adamastor.ac.za>, Dale How
<hwxd...@mail.uct.ac.za> writes

It is possible, but it depends on how you've written the code. There are
some tools which take in plain C (not C++); see

Adalante (formerly Frontier Design)

C-Level Design

There's a tool which uses a variant of C,

Handel-C - see www.celoxica.com

There's the SystemC class library, see www.osci.org. There's a whole set
of links to tools on this web-site, including

Synopsys Cocentric SystemC compiler.

There's also a number of other class libraries, e.g.

Cynlib from Cynapps

and

Ocapi/Soc++ from IMEC in Belgium

Some of these routes are more mature than others. Some are strictly C,
not C++. All of them will have restrictions on what you can write, and
the style of code that is allowed.

kind regards

Alan

P.S. I apologise if I've left any companies out, now's your chance to
follow up this post!

--
Alan Fitch
DOULOS Ltd.
Church Hatch, 22 Market Place, Ringwood, Hampshire BH24 1AW, United Kingdom
Tel: +44 1425 471223 Email: alan....@doulos.com
Fax: +44 1425 471573 Web: http://www.doulos.com

**********************************
** Developing design know-how **
**********************************

This e-mail and any attachments are confidential and Doulos Ltd. reserves
all rights of privilege in respect thereof. It is intended for the use of
the addressee only. If you are not the intended recipient please delete it
from your system, any use, disclosure, or copying of this document is
unauthorised. The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.


Extern

unread,
Aug 24, 2001, 9:32:21 AM8/24/01
to
Hi

Our design team is following the progress on that front closely, but untill
now you can't speak from a real c to vhdl translator. You must rather say
"translate a c likely language to vhdl." The currently translateble code is
very limited compared with the c-possebilities. The code must be written in
formal C, a derived subset of the c language. Can you come back in a few
years?

C++ is not supported.

Kind regards
J.
----------------------------------------------------------------
Johan Van Dyck
VLSI Design Engineer &
Design Technology Office
Philips Leuven (Belgium)
Johan.V...@philips.com
----------------------------------------------------------------
"Dale How" <hwxd...@mail.uct.ac.za> schreef in bericht
news:9m3di8$jcn$1...@news.adamastor.ac.za...

Cor Schepens

unread,
Aug 24, 2001, 11:43:22 AM8/24/01
to
Dale,

Like Alan said: IT IS POSSIBLE and designers are using it
successfully. Of course, you can't throw any type of C/C++ code in
such a tool and expect to get an optimal VHDL architecture. You will
have to use a certain coding style and it will only accept a certain
subset of C and C++. But it is not restricted to "What You Write Is
What You Get". You have also the possibility to let such a tool "map"
your code to your application-specific DSP architecture. Eg, that all
your multiplication instantiations (let's say 20) in your C-code will
be mapped to the available multipliers (let's say 1 or 2) within this
DSP.

THE GOOD THING is that you are now able to work in a TOP-DOWN
APPROACH, taking C-code on a behavioral level and convert it RTL VHDL.
If you want to improve the results, you can try to use more (or less)
resources or make an incremental change to your C-code. Such an
incremental code change can easily be debugged when you made a
mistake, because you know, which lines you have changed. So, debugging
becomes a lot faster. You will make less bugs and will find them
easier and faster (fast C-simulation).
The traditional BOTTOM-UP APPROACH (staring at C-code and trying to
come up with an architecture that can implement it, followed by
hand-coding VHDL) is a manual and slow process. Once your VHDL is in a
stage that you can start debugging and you find a mistake, this
mistake might be anywhere in your VHDL code.

If you have a serious application of which parts are already described
in C/C++, I would take a serious look at what is available on the
market, today.

regards, Cor

Alan Fitch <alan....@doulos.com> wrote in message news:<vV6+AgAI...@doulos.co.uk>...

Andy Peters <andy [@] exponentmedia

unread,
Aug 24, 2001, 12:06:51 PM8/24/01
to
Seems to me the whole notion of converting C or C++ to VHDL is born out
of sheer laziness. "Well, the software guys have already developed this
code. Let's burn it into an FPGA or an ASIC and make it run faster."

If you understand the problem well enough, you oughta be able to express
it properly in either language. For hardware description, you're still
better off with an HDL.

If you insist on using C, I'm willing to bet that the subset of C you'll
use for synthesizable modules will be quite restricted, and won't
compile and run natively on your Linux box.

Perhaps you can convince Stallman and the rest of the gnu persons to add
-target=virtex to gcc.

Note that experienced HDL persons already understand about writing
synthesizable code. But at least we can simulate our designs with the
same language using the non-synthesizable stuff, albeit in a particular
"environment" [the simulator's].

If you don't understand the problem well enough, blindly trusting a tool
to do the translation for you will bite you in the ass when you're in
debug, trying to figure out why the thing's not working. That's
language-independent, of course. (I don't blindly trust my HDL
synthesis tools, or the P+R tools.)

-andy

Ian Smith

unread,
Aug 28, 2001, 6:25:21 AM8/28/01
to
The only decent tool demo I have seen is:

Handel-C - see www.celoxica.com

We are currently trying it out for ourselves, but it seems helpful for
taking more complicated math functions and control state machines in C to
VHDL.

They have an extensive set of libraries for FPGA.


gustaf

unread,
Sep 3, 2001, 4:55:03 AM9/3/01
to
I used Handel-C to make image filter for a short time.
i think that handel-C is simple and easy for C/C++ programer and System
engineer but it's not good for synthersis(lower performance about size and
operating frequency).
and...Handel-C is similar in grammar to ANSI C. but different
user cannot automatically generate C/C++ to Handel-C.

"Ian Smith" <ian_...@hotmail.com> wrote in message
news:pkKi7.22832$ZU6.60327@NewsReader...

Reply all
Reply to author
Forward
0 new messages