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

Testbenches<br />

Testbenches<br />

A testbench is a sequence of parameterized simulator commands or circuit element descriptions,<br />

which can be viewed as the encapsulation of a set of commands or element descriptions that are<br />

necessary within a specific context. For example, to perform a slew-rate characterization, it may<br />

be necessary to instantiate the loading capacitor with a certain capacitance value, to define the<br />

slope of a PWL input signal as a specific value, and to run a transient simulation of a certain<br />

duration. These sets of commands can be reused in multiple simulations, and each time the<br />

parameterized parts can receive different values. A complete simulation is defined by<br />

assembling one or more testbenches, typically with the base netlist. This assembly process is<br />

explicit.<br />

This section contains:<br />

Testbench Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809<br />

Testbench Instantiation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811<br />

Rules for Testbench Location Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813<br />

Testbench Definition<br />

A testbench definition starts with the .define_testbench keyword, and finishes with a<br />

.end_define_testbench command. A testbench accepts input arguments. The number of<br />

arguments is not limited; a testbench may have no arguments at all.<br />

Tip<br />

See “.DEFINE_TESTBENCH” in the Eldo Reference Manual.<br />

A testbench is a set of simulator commands or circuit element descriptions that can be<br />

parametrized using the arguments of the testbench.<br />

A testbench can be considered as a <strong>user</strong>-defined macro. When instantiated, the testbench call is<br />

simply replaced with its content, where all occurrences to testbench arguments are replaced<br />

with their instantiation value.<br />

A testbench may be instantiated in either of the following ways:<br />

• In the netlist (or in another testbench) using a . command,<br />

which then appears as an additional Eldo command in a regular Eldo netlist.<br />

• From the simulation function used in a task (in which case the calling syntax uses<br />

parenthesis and comma-separated arguments—similar to classical programming) to<br />

request to instantiate the testbench into the netlist that will be simulated (see “Defining<br />

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

A testbench may call another testbench defined in the same netlist/file as itself, or in another<br />

netlist/file (as long as it is included in the main netlist with a .INCLUDE or a .LIB command).<br />

Eldo® User's Manual, 15.3 809

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

Saved successfully!

Ooh no, something went wrong!