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

Testbenches may be nested, or more precisely, it is possible to instantiate a testbench inside<br />

another testbench. It is not permitted for a testbench to instantiate itself.<br />

Limitation: SPICE parameters can be used to set values to testbench parameters when<br />

instantiating a testbench in the netlist if they are declared before the testbench instantiation. For<br />

example:<br />

.param p1 = 1<br />

Example<br />

.tb_1(param1=p1)<br />

.define_testbench tran_setup (duration=1n)<br />

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

.tran 0 duration<br />

.end_define_testbench<br />

.define_testbench measure_tprop<br />

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

.tran_setup duration=100n<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 />

In the example above, the tran_setup testbench is instantiated inside the measure_tprop<br />

testbench.<br />

Note<br />

It is not permitted to define a “local” testbench inside another testbench.<br />

A special testbench is automatically defined during elaboration. It consists of the part of the<br />

netlist that contains no task definition or testbench, and it is included by default in any<br />

simulation run from a task.<br />

Related Topics<br />

Defining and Running Simulations<br />

Rules for Testbench Location Resolution<br />

812<br />

Eldo® User's Manual, 15.3

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

Saved successfully!

Ooh no, something went wrong!