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

.STEP Alternative<br />

.define_testbench tb_netlist (param_tb_value = 1 )<br />

2. Modify the original netlist to exclude the .STEP and modify the .PARAM command to<br />

use the testbench argument:<br />

.param p = param_tb_value<br />

.end_define_testbench<br />

3. Define an ECL task with a step loop to run the simulations. This is an incremental loop;<br />

the parameter being swept, loop_param, is specified with param. The start, stop, and<br />

step define the loop structure. The loop ends with the endstep command.<br />

.define_task t1<br />

/* parameter for the step loop. */<br />

set loop_param = 1<br />

set wave_res[] = 0<br />

/* step loop similar to the .step command. */<br />

step (type=step, param=loop_param, start=1k, stop=200k, step=1k)<br />

/* run the simulation. */<br />

simulation(tb_netlist(param_tb_value=loop_param),<br />

+ name="res/simu" + loop_param + ".cir",<br />

+ wave_res[loop_param/1k]=@res_wave)<br />

endstep<br />

.end_define_task<br />

.t1<br />

The full example is located in $MGC_AMS_HOME/examples/ecl/25-step_alternative.<br />

The simulation command runs the simulation of the testbench and obtains results. The<br />

simulation files and waveforms for each step will be generated in different files in the output<br />

directory res. The name of each file is made up of the simu prefix followed by the step index<br />

(simu1, simu2, simu3, and so on). These generated files can be useful to debug simulations. A<br />

directory has been specified so that all generated temporary files can be easily removed. The<br />

testbench is instantiated with the .t1 statement.<br />

An important difference to note compared with a regular .STEP is:<br />

With the original netlist, compound waveforms are generated; but with ECL, since there are 200<br />

simulations, by default 200 wdb files will be generated; if the same wdb is used, it will be<br />

overwritten. To avoid this, there are two solutions:<br />

• Specify a specific name for each wdb file (using the “name” argument).<br />

Avoid this solution, because you will have 200 wdb files generated.<br />

1124<br />

Eldo® User's Manual, 15.3

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

Saved successfully!

Ooh no, something went wrong!