10.06.2016 Views

eldo_user

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Eldo Control Language<br />

Testbench Definition<br />

Note<br />

The Eldo Control Language is case-sensitive.<br />

Examples<br />

Here is an example of a simple testbench:<br />

.define_testbench tran_options<br />

.option eps=1e-8 hmax=10p reltol=1e-7 gear<br />

.end_define_testbench<br />

This testbench definition creates a <strong>user</strong>-defined simulator command named .tran_options that<br />

can be used (instantiated) in the base netlist. This testbench has no parameters; instantiating it in<br />

the base netlist or in a simulation run from a task would be equivalent to using the following in<br />

the netlist:<br />

.option eps=1e-8 hmax=10p reltol=1e-7 gear<br />

Note<br />

It is forbidden to use the names of existing simulator commands (such as .ALTER, .STEP,<br />

and so on) as testbench names. Note also that a testbench definition can be added anywhere<br />

in the base netlist, or in files included by the base netlist.<br />

Here is another example of a testbench:<br />

.define_testbench measure_tprop<br />

+ (cload_val=1p, trise=10n, signal="out")<br />

.tran 0 10n<br />

cload signal gnd cload_val<br />

VD D gnd PULSE 0V 1.8V 0n trise trise 50n 100n<br />

.extract tran label=tp xup(V(signal),1.8/2)-xup(V(D),1.8/2)<br />

.extract tran label=avgivdd average(i(vdd))<br />

.end_define_testbench<br />

This example shows a (partially) parameterized testbench. The load capacitance on the<br />

specified node and the rise time of the input signal are parameterized, and may be defined at<br />

instantiation time. The measured propagation time (tp) and the average current consumption<br />

(avgivdd) are .EXTRACT results; their computed values can be returned to the calling task (in<br />

the case that this testbench was instantiated in a simulation run from a task; see “Defining and<br />

Running Simulations” on page 841).<br />

Note<br />

All parameters have a default value, which is mandatory.<br />

810<br />

Eldo® User's Manual, 15.3

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

Saved successfully!

Ooh no, something went wrong!