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.

Post-Processing Library<br />

defineVec<br />

Note<br />

The return value of this function is not a Tcl variable but directly a vector.<br />

Example 2<br />

This function demonstrates the difference between Tcl variables and PPL references. It uses<br />

Mathematical functions with both C-like and Tcl syntaxes and returns to Eldo a reference to the<br />

PPL object “wv_final” to plot it.<br />

proc WAVE_REFERENCE { wv_in } {<br />

# Define a PPL object named wv_out<br />

defineVec wv_out "2*abs($wv_in)"<br />

# Store a PPL refence inside a Tcl variable wv_out<br />

set wv_out [exp $wv_in]<br />

# Define a PPL object named wv_final using both PPL object<br />

# wv_out and the value of Tcl variable wv_out<br />

defineVec wv_final "wv_out + $wv_out"<br />

# Return the final object to Eldo<br />

return wv_final<br />

}<br />

A call to this function from the Eldo command:<br />

.call_tcl tran when=END_OF_RUN PLOT=YES LABEL=Refv1 WAVE_REFERENCE(v(1))<br />

produces a waveform named Refv1 in the .wdb output file; this waveform being the return of<br />

the Tcl function.<br />

Example 3<br />

The following examples show the name of the Tcl function inside a .CALL_TCL command is<br />

case sensitive. It must exactly match the name in the .tcl file.<br />

If the my_func.tcl file contains:<br />

Eldo® User's Manual, 15.3 1147

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

Saved successfully!

Ooh no, something went wrong!