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

Library of Functions for Tasks<br />

.option set_<strong>eldo</strong>_cl_verbose=0<br />

.define_testbench tb_rc<br />

.param period=10<br />

.param pw=1<br />

.step param pw 1 period 1<br />

v1 1 0 pulse (0 5 0 10n 10n 'pw' 'period')<br />

r1 1 2 1k<br />

c1 2 0 1m ic=0<br />

.tran 1 20 uic<br />

.plot tran uc=v(2,0)<br />

.extract tran catvect label=pw_vect pw<br />

.end_define_testbench<br />

* First task using directly the waveform functions on the compound<br />

waveform (more complicated)<br />

.define_task t_simu_rc_compound_arg<br />

set compound_uc = 0<br />

set pw [] = 0<br />

set i = 0<br />

set j = 0<br />

set res_xup4 [] = 0<br />

if (simulation(name="simu_rc/simu_rc.cir", tb_rc(), \<br />

compound_uc=@uc, pw=@pw_vect).simu_status == 0)<br />

/* compound_uc is a compound waveform and pw is the array containing<br />

the different values of the 'pw' parameter. */<br />

res_xup4 = xup(compound_uc, 4)<br />

/* res_xup4 is indeed a matrix. res_xup4[i] is the array containing the<br />

time values where 'uc' rises above 4V when the 'pw' parameter has<br />

the value pw[i]. */<br />

fprint(stdout, "\nExample with compound argument\nuc rises above 4V<br />

at:\n")<br />

/* In the loops below, i is the index of the waveform in the compound<br />

and j iterates through the result values of xup applied to the<br />

waveform with index i of compound_uc. */<br />

for (i=res_xup4.imin; i

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

Saved successfully!

Ooh no, something went wrong!