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

Re: [f-cpu] C/VHDL interface



On Tue, Aug 14, 2001 at 12:43:44AM +0200, Yann Guidon wrote:
> hello,
> 
> when codevelopping the simulator and assembler,
> i am putting several files in common, now
> it is under f-cpu/include/*.h in the snapshots
> i put on http://www.f-cpu.de/design/snapshot.tgz

Can you please include the release date in the filename?
E.g. `snapshot-20010813.tgz', or something like that.
I already have heaps of `snapshot' files lying around ;(

> now, i wonder how to use these files, containing
> only #defines, inside a VHDL project ?
> probably through the use of m4 or cpp ?

Not at all.  If we *really* have to share data between C and VHDL,
there is IMHO only one way to go: use a (very simple) third `source'
format and convert that to C headers and VHDL packages.  But there are
still a lot of restrictions, due to the very different nature of the
two languages.  I suggest the following rules for the source file:

	- the file must contain only constant definitions, comments and
	  empty lines
	- a comment starts with "#" and ends at the next linefeed
	- each definition starts on a separate line
	- long lines may be split with backslash-newline (C-style)
	- each definition looks like `NAME = value'
	- `NAME' shall be a valid VHDL identifier, but must not
	  contain lower-case letters (VHDL isn't case-sensitive, but C is!)
	- NAMEs may be defined at most *once*
	- `value' must be an integer constant, a string or character
	  constant (without escape characters), or a simple expression
	  containing only integer constants and previously defined NAMEs
	- simple expressions must not use operators other than `*'
	  (multiplication), `/' (division), `+' (sum) and `-' (subtraction
	  or negation), and the parentheses '(' and ')'
	- whitespace is not significant, except in string/character
	  constants

If we can agree on that, I'll happily contribute filters that convert
this file format to C and VHDL.

> I am also desperately seeking "decent" VHDL 93 software
> for linux. only SIMILI or NCSIM would work but
> i'm not a linux configuration guru and i can't setup
> either wine (for simili, under a debian distrib)
> or the network (Cadence locksthe SW to the MAC address).
> i have tried FreeHDL and it's worse than i thought :-/
> Alliance and Electric Editor are not better either.

Vanilla VHDL works for me (but Simili under NT is faster).

-- 
 Michael "Tired" Riepe <Michael.Riepe@stud.uni-hannover.de>
 "All I wanna do is have a little fun before I die"
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/