10.06.2016 Views

eldo_user

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Eldo Netlist Setup<br />

Directives Interpreted using the C Pre-Processor (-E/-EE Arguments)<br />

Related Topics<br />

Directives<br />

Directives Interpreted using the C Pre-Processor (-E/-EE Arguments)<br />

Directives Interpreted using the C Pre-Processor<br />

(-E/-EE Arguments)<br />

For an extended use of pre-processor commands to define macros and replace them inside the<br />

netlist (see the example below), the -E or -EE argument needs to be specified. These are not the<br />

Eldo default because the parsing of large circuits may be significantly slower.<br />

The -E argument forces Eldo to provide only the main netlist to the C pre-processor, whereas<br />

-EE ensures that all #include filename statements will be pre-processed before parsing. The<br />

.INCLUDE/.LIB statements, which are SPICE commands, are not understood by the C preprocessor<br />

and so will not be pre-processed.<br />

The #include directive can only be used when the -E/-EE arguments are specified.<br />

Note: The C pre-processor analyses files independently. Therefore #define statements are only<br />

known to the file they are defined in.<br />

The -define argument can also be specified on the command line, and it will have the same<br />

effect as without the -E/-EE arguments. To use #define in Eldo in the same way you define<br />

macros in the C language, the syntax is as follows:<br />

#define macro(args) expression<br />

When the macro is encountered in the netlist, it is replaced by the expression. Arguments of the<br />

macro will be replaced by the literals in the macro call. For example:<br />

#define sat_margin(device) abs(vds(device)-vdss(device))<br />

.extract sat_margin(XM0.M1)<br />

will be replaced by:<br />

.extract abs(vds(XM0.M1)-vdss(XM0.M1))<br />

Note<br />

Because -E/-EE uses the C pre-processor, you must ensure there is a carriage return<br />

proceeding the directive in the file to avoid problems. Uppercase function names are not<br />

accepted. Using comments defined with #com and #endcom are not compatible with -E/-EE.<br />

Related Topics<br />

Directives<br />

126<br />

Eldo® User's Manual, 15.3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!