A
Alfonso Baz
Guest
I come from a C programming background where something like this can be done
#define MAX 32
at compile time the source code is parsed and any instants of MAX are
replaced with 32 before being passed to the compiler proper
I have been using constants thinking they were the same thing, but on closer
inspection I see we're having to give it a type also. This is leading me to
believe that a constant takes up hardware resources.
Does VHDL have some kind of pre-compiler/parser that can handle substitution
and math prior to compiling such as this in C
#define MAX 32
#define EXP 2
....
if( x == MAX^EXP)...
which gets changed to
if(x == 1024)
Thanks
#define MAX 32
at compile time the source code is parsed and any instants of MAX are
replaced with 32 before being passed to the compiler proper
I have been using constants thinking they were the same thing, but on closer
inspection I see we're having to give it a type also. This is leading me to
believe that a constant takes up hardware resources.
Does VHDL have some kind of pre-compiler/parser that can handle substitution
and math prior to compiling such as this in C
#define MAX 32
#define EXP 2
....
if( x == MAX^EXP)...
which gets changed to
if(x == 1024)
Thanks