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

Parallel Operation<br />

.define_testbench tb_netlist(pr_value=100k, pc_value=10u)<br />

.param pr=pr_value<br />

.param pc=pc_value<br />

v1 1 0 PWL 0 0 0.1 3<br />

r1 1 2 pr<br />

c1 2 0 pc<br />

.tran 1 10<br />

.extract label=t2 xthres(v(2), 2)<br />

.end_define_testbench<br />

.define_task t_step_para<br />

set i = 0<br />

/* Parallel loop for simulations. */<br />

para_step (type=step,<br />

+ param=i,<br />

+ start=10k,<br />

+ stop=100k,<br />

+ step=10k)<br />

/* Use local variables for local results inside the loop. */<br />

set res = 0<br />

set t2 = 0<br />

res = simulation(tb_netlist(pr_value=i),<br />

+ t2=@t2)<br />

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

fprint(stdout,<br />

+ "t2=%.2g for R=%.2g\n",<br />

+ t2, i)<br />

else<br />

fprint(stdout,<br />

+ "Run %d failed.\n",<br />

+ ijob())<br />

endif<br />

end_para_step<br />

.end_define_task<br />

.t_step_para<br />

Continue, Break and Return Parallel Behavior<br />

The continue keyword has the same meaning and the same effect inside a parallel loop as inside<br />

a sequential loop: the current run is stopped. The break and return keywords have a different<br />

semantic: break and return only prevent the execution of runs (jobs) that have not begun<br />

(because of .option set_<strong>eldo</strong>_cl_max_para); all runs that have begun won’t be stopped.<br />

Example: because of parallelism, using a break on the 5th run will not always prevent the 6th<br />

from being executed:<br />

1050<br />

Eldo® User's Manual, 15.3

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

Saved successfully!

Ooh no, something went wrong!