29.03.2013 Views

Affirma Spectre DC Device Matching Analysis Tutorial - Cadence ...

Affirma Spectre DC Device Matching Analysis Tutorial - Cadence ...

Affirma Spectre DC Device Matching Analysis Tutorial - Cadence ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

}<br />

<strong>Affirma</strong> <strong>Spectre</strong> <strong>DC</strong> <strong>Device</strong> <strong>Matching</strong> <strong>Analysis</strong> <strong>Tutorial</strong><br />

tmp = 1.0/(w*l);<br />

alpha[0][0] += (tmp*tmp);<br />

alpha[0][1] += (tmp*tmp)/l;<br />

alpha[0][2] += tmp;<br />

alpha[1][0] += (tmp*tmp)/l;<br />

alpha[1][1] += (tmp*tmp)/(l*l);<br />

alpha[1][2] += (tmp/l);<br />

alpha[2][0] += tmp;<br />

alpha[2][1] += tmp/l;<br />

alpha[2][2] += 1.0;<br />

/* convert to fortran array, since we will be calling fortran solvers */<br />

for (i = 0; i < n; i++) {<br />

for (j = 0; j < n; j++) {<br />

F77CONV( farray, i, j, lda ) = alpha[i][j];<br />

}<br />

}<br />

/* solve the matrix to obtain the three fitted model parameters */<br />

dgeco_( farray, &n, &lda, ipvt, &rcond, work);<br />

t = 1.0 + rcond;<br />

if (t == 1.0) {<br />

printf("singluar matrix of alpha encountered rcond = %g\n",rcond);<br />

}<br />

dgesl_( farray, &n, &lda, ipvt, rhs, &zero);<br />

Release Date Back Page 25<br />

Close<br />

25

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

Saved successfully!

Ooh no, something went wrong!