designerjoe
New Member
Offline
Posts: 6
England
|
I am creating Verilog-A models for simulation in Cadence and Spectre and would like to create macros that incorporate other macros and/or contants.
It should be possible to define one macro as result of another one and one or several operations such as:
`define WORD 2 `define LONGWORD (4*WORD)
This seems all well and good until one actually tries to use the macro `LONGWORD in the code. The parser then gives an error message suggesting that LONGWORD uses an undeclared identifier: WORD.
The end of the error message reads like this: Encountered undeclared identifier: WORD. Declare the identifier before using it.
This isn't actually the macro I am going for but unless I can get something as simple as the example above working there is no chance to get anything really productive in place.
Could someone please tell me if this is an intended limitation of the compiler directives for Cadence or if I'm missing a vital point in the syntax rules?
|