No, cpp, the C preprocessor. #define, #include, etc. If you've got a
standard GNU GCC installation, the preprocessor is a standalone
program, and can be used on anything you like not just C. Good:
super-easy to work with and you already know the syntax. Bad: pretty
limited in terms of what it can do.
>
> >M4,
> Hard to find - can you provide some link?
>
http://www.gnu.org/software/m4/
Good: Super powerful. Turing complete in fact; you can make M4 do
pretty much anything you want it to. Bad: Expect to spend time syntax
tuning. Lots and lots of time. One thing that helps with that is to
use whichever command line setting changes the command names from
things like divert and index to m4_divert and m4_index, you'll get far
fewer collisions that way.
> >Inevitably, they allowed me to write
> > non-standard code that was more difficult to maintain and work with in
> > the long run.
> Yes...
>
> > Whatever it is you think you need a preprocessor for, you're probably wrong.
> I need it to control matlab->HDL flow easily.
> F.E. change vhdl coder output parts for using some FPGA embedded DSP blocks.
> etc.
> Have my own samples, but do not want to reinvent the wheel in the case of bone preprocessor :)
Another option would be to have Matlab write out text files, and use
std.textio to read those text files from VHDL to configure things.
That's generally kosher for synthesis so long as your use of textio
only happens at elaboration time. Generally you'd wrap a function
around the textio calls, and have that function return something that
can initialize a constant, that can then make the rest of your code do
what it ought. I've used this technique primarily for initializing
ROMs, filter coefficients, etc.
Or have Matlab write out functions, procedures, or
constants to a VHDL package file, and then use that package in your
main code. I've used this technique to create packages that hold
things like Subversion revision, timestamp, etc, in such a way that
they can be synthesized in.