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

Defining and Running Simulations<br />

set tprop=0 powercons=0 res=0<br />

res = simulation<br />

+ (name="sim_dir/tprop.cir", log="sim_dir/tprop.log", args="-silent -<br />

nowdb",<br />

+ tran_options(),<br />

+ measure_trop(cload_val=1.5p, signal="dff_out"),<br />

+ tprop=@tp, powercons=@avgivdd))<br />

if (res.simu_status == 0)<br />

fprint(stdout, "tprop: %.5g power_cons: %.5g\n", tprop, powercons)<br />

else<br />

fprint(stdout, "Simulation failed\n")<br />

endif<br />

In the example above, the simulation is built by instantiating two testbenches, namely<br />

tran_options and measure_tprop, which were previously shown as examples (see “Testbenches”<br />

on page 809). The tran_options testbench has no parameters. The measure_tprop testbench is<br />

passed several arguments, which override the default values provided in its definition. The<br />

cload_val parameter takes the value 0.5p (0.5×10 −12 ), and the signal parameter is set to dff_out.<br />

The trise parameter is not passed, thus it will take its default value, 10n.<br />

The tprop and powercons scalar variables (explained in “Variables” on page 821) are used to<br />

store the values of the tp and avgivdd quantities computed as results of the simulation (they are<br />

labels of the extract commands contained in the measure_tprop testbench).<br />

Normally, the order of appearance of commands or element descriptions in the final netlist is<br />

not important. Note, however, that the testbenches defined within the simulation command are<br />

appended in the same order as they appear in the simulation command.<br />

Based on the example above, the fprint function generates the resulting netlist, tprop.cir, as<br />

follows:<br />

<br />

*tran_options testbench :<br />

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

*measure_tprop testbench :<br />

.tran 0 10n<br />

cload dff_out gnd 1.5p<br />

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

.extract tran label=tp xup(V(dff_out))-xup(V(D))<br />

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

And the process would be launched as follows:<br />

<strong>eldo</strong> -silent -nowdb -i sim_dir/tprop.cir > sim_dir/tprop.log &<br />

This previous example illustrates the first use model: indeed, the local netlist must not be empty<br />

for the simulation to succeed; it must contain dff_out and gnd nodes, a D input, and a VDD<br />

power supply.<br />

842<br />

Eldo® User's Manual, 15.3

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

Saved successfully!

Ooh no, something went wrong!