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

.define_testbench tb_rc(v_extract=4)<br />

.param param_r = 10k<br />

v1 1 0 5<br />

r1 1 2 param_r<br />

c1 2 0 100u ic=0<br />

.tran 1 20 uic<br />

.plot tran v(1,0)<br />

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

* x_extract will be a vector because of the .alter commands at the end of<br />

the netlist.<br />

.extract tran label=x_extract xthres(v(2,0), v_extract)<br />

.end_define_testbench<br />

.define_task t_simu<br />

set extract_res [] = 0<br />

set r_res [] = 0<br />

set i = 0<br />

/* Run the simulation and get the vector results. */<br />

if (simulation( \<br />

name="simu_rc/simu_rc.cir", \<br />

tb_rc(), \<br />

extract_res=@x_extract, r_res=@param_r).simu_status == 0)<br />

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

fprint(stdout, "uv crosses 4V at:\n")<br />

for (i=extract_res.imin; i

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

Saved successfully!

Ooh no, something went wrong!