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<br />

Directives<br />

Directives can be used to simulate variations of circuits.<br />

IF, ELSE, ELSEIF, ENDIF Conditional Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121<br />

String Operator on If Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122<br />

Directives Interpreted by the Eldo Parser (Default) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122<br />

Directives to Postpone Block of Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125<br />

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

IF, ELSE, ELSEIF, ENDIF Conditional Statements<br />

IF, ELSE, ELSEIF, and ENDIF conditional statements can be used inside the Eldo netlist and<br />

can be used to instantiate devices depending on parameter size. ELIF and ELSIF keywords are<br />

also accepted as the ELSEIF condition.<br />

• The IF, ELSE, ELSEIF, ENDIF section must not contain any command, otherwise<br />

unexpected results can be obtained. Warnings are issued in this case.<br />

• The parameters used in expressions of if statements are evaluated during the parsing of<br />

the design only, even if these parameters are changed at run time (because of .STEP, for<br />

instance), then the design will not be changed, a message will be issued that the<br />

operation cannot be taken into account. The .ALTER mechanism should be preferred<br />

here.<br />

Example of usage:<br />

.subckt foo 1 param: p1 = 1<br />

if (p1 >= 1.5)<br />

r1 1 0 '2*p1'<br />

else<br />

r1 1 0 '3*p1'<br />

endif<br />

.ends<br />

i1 1 0 3<br />

x1 1 foo p1 = 3<br />

.op<br />

.end<br />

In this example, the value of resistor r1 will be 6 Ω.<br />

Note<br />

Errors are issued if ADMS is used, or if X or Y statements are present inside if-endif blocks.<br />

Tip<br />

See “.IF, .ELSE, .ELSEIF, .ENDIF” in the Eldo Reference Manual.<br />

Eldo® User's Manual, 15.3 121

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

Saved successfully!

Ooh no, something went wrong!