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.

Specifying Simulation Output<br />

Extract Examples<br />

.step param p1 1 10 0.5<br />

.extract tran label=idsm1 yval(ids(m1), 50n)<br />

.extract sweep label=idsm1_min min(extract(idsm1))<br />

.extract sweep label=p1_idsm1_min<br />

+ xycond(xaxis, extract(idsm1)==extract(idsm1_min))<br />

The first extract command finds the value idsm1 for each step. The second extract command<br />

finds the minimum of idsm1 over the sweep. The third extract command finds the p1 value<br />

corresponding to idsm1_min.<br />

Related Topics<br />

Extracting Information<br />

Extract Examples<br />

Example Combining Sweep Extract and .ALTER<br />

This example shows how the sweep extract also works on waveforms generated from an<br />

.EXTRACT combined with a .ALTER.<br />

The example is based on the loop_stability_opamp.cir netlist in $MGC_AMS_HOME/<br />

examples/<strong>eldo</strong>/, with some changes to the inputs, extracts, and with the addition of a .ALTER<br />

block.<br />

VINP INP 0 AC 1 0<br />

VINN INN 0 AC 1 0<br />

...<br />

.ac dec 10 1 1e8<br />

.plot ac v(out)<br />

.extract ac label=G400M yval(vdb(out),1k)<br />

.alter DM_GAIN<br />

VINP INP 0 AC 0.5 90<br />

VINN INN 0 AC 0.5 -90<br />

.extract sweep label=CMRR yval(meas(G400M),1)-yval(meas(G400M),0)<br />

The first extract command, labeled G400M, finds the y-axis value of the waveform vdb(out) at<br />

1kHz. The .ALTER block, DM_GAIN, replaces the opamp input voltage sources with a<br />

differential input where VINP is shifted in phase from VINN and extracts the G400M<br />

information again. The .EXTRACT SWEEP command in the .ALTER block finds the<br />

difference between the two extracted y-axis values to generate the CMRR result (ratio of the<br />

differential mode gain and common mode gain).<br />

Extract<br />

Alter index0 G400M<br />

Alter index1 G400M<br />

CMRR<br />

Value<br />

-1.4292E+01<br />

6.5083E+01<br />

7.9375E+01<br />

Eldo® User's Manual, 15.3 333

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

Saved successfully!

Ooh no, something went wrong!