Generating C header files?

T

T

Guest
Greetings:

We have a VHDL file with register definitions, does anyone know of a
tool/script which will parse this code and be capable of generating a
C header file for the software folks?

Thanks in Advance!
Tom
 
"T" <g4173c@motorola.com> wrote in message
news:2ba9531e-715a-4451-a4c4-a40f5588ad82@z9g2000yqi.googlegroups.com...
Greetings:

We have a VHDL file with register definitions, does anyone know of a
tool/script which will parse this code and be capable of generating a
C header file for the software folks?
Tcl plus a bit of regular expression should do the trick. I would recommend
Trev from Doulos which makes building regular expression easy as pie....

http://www.doulos.com/knowhow/tcltk/examples/trev/

Hans
www.ht-lab.com


Thanks in Advance!
Tom
 
"T" <g4173c@motorola.com> wrote in message
news:2ba9531e-715a-4451-a4c4-a40f5588ad82@z9g2000yqi.googlegroups.com...
Greetings:

We have a VHDL file with register definitions, does anyone know of a
tool/script which will parse this code and be capable of generating a
C header file for the software folks?
Other have suggested ad hoc parsers (e.g., regular expressions).
If these work well enough for you, then that's fine.

If you need to parse real VHDL as opposed to some significantly
constrained subset, regular expressions won't do the trick,
you need real parsers.

The DMS Software Reengineering Toolkit has full VHDL parsers,
and can apply custom transformation rules to generate C headers
as you suggest. See
http://www.semanticdesigns.com/Products/DMS/DMSToolkit.html

Ira D. Baxter, CTO
Semantic Designs
 
There are also free tools you can use to parse VHDL. We based our VHDL tools
on a free VHDL grammar for the Java Compiler Compiler (JavaCC). The VHDL
grammar can be found on the JavaCC site itself. You will have to do the
work of editing the grammar or java source files to get and manipulate the
information you want. Trust me though, this is no easy task. There is a
steep learning curve with the tools, especially if you're not a compiler
person. Looking back, I would have preferred to use a closed-source VHDL
front end (see previous post) that expose a good API, but they are extremely
expensive and I'm in an academic research environment.

I would be willing to contract with you to work-out a solution using free
tools, saving you both time and money.


---Matthew Hicks


"T" <g4173c@motorola.com> wrote in message
news:2ba9531e-715a-4451-a4c4-a40f5588ad82@z9g2000yqi.googlegroups.com.
..

Greetings:

We have a VHDL file with register definitions, does anyone know of a
tool/script which will parse this code and be capable of generating a
C header file for the software folks?

Other have suggested ad hoc parsers (e.g., regular expressions). If
these work well enough for you, then that's fine.

If you need to parse real VHDL as opposed to some significantly
constrained subset, regular expressions won't do the trick,
you need real parsers.
The DMS Software Reengineering Toolkit has full VHDL parsers,
and can apply custom transformation rules to generate C headers
as you suggest. See
http://www.semanticdesigns.com/Products/DMS/DMSToolkit.html
Ira D. Baxter, CTO
Semantic Designs
 

Welcome to EDABoard.com

Sponsor

Back
Top