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

.MPRUN with Monte Carlo Analysis Example<br />

See “Testbenches” on page 809, “Tasks” on page 814, “Variables” on page 821, “Flow Control<br />

Statements” on page 835, “Defining and Running Simulations” on page 841, and the fprint<br />

function for more information on the concepts used in the example.<br />

Tip<br />

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

Related Topics<br />

Examples Using ECL as an Alternative to Standard Eldo Commands<br />

.MPRUN with Monte Carlo Analysis Example<br />

This example shows how the .MPRUN command works at the testbench level. For a given<br />

simulation (run from an ECL task), if the netlist to simulate contains a .MPRUN command and<br />

a .MC command for example, then the Monte Carlo runs of this simulation will be distributed as<br />

usual.<br />

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

[netlist]<br />

* parameter for the ECL step loop<br />

.param p = param_tb_value<br />

* parameter for the .mc<br />

.param pv=3 lot=0.01<br />

.mc 100<br />

.mprun host=myhost1, myhost2, myhost3<br />

.end_define_testbench<br />

.define_task t1<br />

set loop_param = 1<br />

set wave_res[] = 0<br />

set res = 0<br />

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

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

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

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

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

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

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

fprint(stdout, "Error: simulation failed!\n")<br />

return -1<br />

endif<br />

endstep<br />

.end_define_task<br />

.t1<br />

Eldo® User's Manual, 15.3 1133

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

Saved successfully!

Ooh no, something went wrong!