FTN66,Y,J,E 
*************************************************************** 
* (C) COPYRIGHT HEWLETT-PACKARD COMPANY 1980.  ALL RIGHTS     * 
* RESERVED.  NO PART OF THIS PROGRAM MAY BE PHOTOCOPIED, RE-  * 
* REPRODUCED, OR TRANSLATED TO ANOTHER PROGRAM LANGUAGE WITH- * 
* OUT THE PRIOR WRITTEN CONSENT OF HEWLETT-PACKARD COMPANY.   * 
*************************************************************** 
*  NAME:   DCOP                       * 
*  SOURCE: 92091-18006                * 
*  RELOC:  92091-16006                * 
*  PGMR:   C. GEBER                   * 
*************************************** 
$PAGE 
$EMA /BLANK/
$CDS ON 
      SUBROUTINE ASOL 
     + ,92091-16006 REV.5000 <890418.1141>
      IMPLICIT REAL*8 (A-H,O-Z) 
C 
C     THIS ROUTINE EVALUATES THE ADJOINT CIRCUIT RESPONSE BY DOING A
C FORWARD/BACKWARD SUBSTITUTION ON THE TRANSPOSE OF THE COEFFICIENT 
C MATRIX. 
C 
      COMMON /TABINF/ IELMNT,ISBCKT,NSBCKT,IUNSAT,NUNSAT,ITEMPS,NUMTEM, 
     1   ISENS,NSENS,IFOUR,NFOUR,IFIELD,ICODE,IDELIM,ICOLUM,INSIZE, 
     2   JUNODE,LSBKPT,NUMBKP,IORDER,JMNODE,IUR,IUC,ILC,ILR,NUMOFF,ISR, 
     3   NMOFFC,ISEQ,ISEQ1,NEQN,NODEVS,NDIAG,ISWAP,IEQUA,MACINS,LVNIM1, 
     4   LX0,LVN,LYNL,LYU,LYL,LX1,LX2,LX3,LX4,LX5,LX6,LX7,LD0,LD1,LTD,
     5   IMYNL,IMVN,LCVN,NSNOD,NSMAT,NSVAL,ICNOD,ICMAT,ICVAL, 
     6   LOUTPT,LPOL,LZER,IRSWPF,IRSWPR,ICSWPF,ICSWPR,IRPT,JCPT,
     7   IROWNO,JCOLNO,NTTBR,NTTAR,LVNTMP 
      COMMON /CIRDAT/ LOCATE(50),JELCNT(50),NUNODS,NCNODS,NUMNOD,NSTOP, 
     1   NUT,NLT,NXTRM,NDIST,NTLIN,IBR,NUMVS
      COMMON /BLANK/ VALUE(64)
      INTEGER NODPLC(64)
      COMPLEX CVALUE(32)
      EQUIVALENCE (VALUE(1),NODPLC(1),CVALUE(1))
C 
C  FORWARD SUBSTITUTION 
C 
      DO 20 I=2,NSTOP 
      IORD=NODPLC(ICSWPF+I) 
      LOC=I 
   10 LOC=NODPLC(IRPT+LOC)
      IF (NODPLC(IROWNO+LOC).GE.I) GO TO 15 
      J=NODPLC(IROWNO+LOC)
      JORD=NODPLC(ICSWPF+J) 
      VALUE(LVN+IORD)=VALUE(LVN+IORD)-VALUE(LVN+LOC)*VALUE(LVN+JORD)
      GO TO 10
   15 JORD=NODPLC(IRSWPF+I) 
      LOCNN=INDXX(JORD,IORD)
      VALUE(LVN+IORD)=VALUE(LVN+IORD)/VALUE(LVN+LOCNN)
   20 CONTINUE
$PAGE 
C 
C  BACKWARD SUBSTITUTION
C 
      I=NSTOP 
   30 I=I-1 
      IF (I.LE.1) GO TO 60
      IORD=NODPLC(ICSWPF+I) 
      LOC=I 
   35 LOC=NODPLC(IRPT+LOC)
   40 IF (NODPLC(IROWNO+LOC).NE.I) GO TO 35 
   50 LOC=NODPLC(IRPT+LOC)
      IF (LOC.EQ.0) GO TO 30
      J=NODPLC(IROWNO+LOC)
      JORD=NODPLC(ICSWPF+J) 
      VALUE(LVN+IORD)=VALUE(LVN+IORD)-VALUE(LVN+LOC)*VALUE(LVN+JORD)
      GO TO 50
C 
C     REORDER SOLUTION VECTOR 
C 
   60 DO 70 I=1,NSTOP 
      J=NODPLC(IRSWPR+I)
      K=NODPLC(ICSWPF+J)
      VALUE(LVNTMP+I)=VALUE(LVN+K)
   70 CONTINUE
      CALL COPY8(VALUE(LVNTMP+1),VALUE(LVN+1),NSTOP)
C 
C  FINISHED 
C 
      RETURN
      END 
$EMA /BLANK/
      SUBROUTINE DCOP 
     + ,92091-16006 REV.5000 <890418.1141>
      IMPLICIT REAL*8 (A-H,O-Z) 
C 
C     THIS ROUTINE PRINTS OUT THE OPERATING POINTS OF THE NONLINEAR 
C CIRCUIT ELEMENTS. 
C 
      COMMON /TABINF/ IELMNT,ISBCKT,NSBCKT,IUNSAT,NUNSAT,ITEMPS,NUMTEM, 
     1   ISENS,NSENS,IFOUR,NFOUR,IFIELD,ICODE,IDELIM,ICOLUM,INSIZE, 
     2   JUNODE,LSBKPT,NUMBKP,IORDER,JMNODE,IUR,IUC,ILC,ILR,NUMOFF,ISR, 
     3   NMOFFC,ISEQ,ISEQ1,NEQN,NODEVS,NDIAG,ISWAP,IEQUA,MACINS,LVNIM1, 
     4   LX0,LVN,LYNL,LYU,LYL,LX1,LX2,LX3,LX4,LX5,LX6,LX7,LD0,LD1,LTD,
     5   IMYNL,IMVN,LCVN,NSNOD,NSMAT,NSVAL,ICNOD,ICMAT,ICVAL, 
     6   LOUTPT,LPOL,LZER,IRSWPF,IRSWPR,ICSWPF,ICSWPR,IRPT,JCPT,
     7   IROWNO,JCOLNO,NTTBR,NTTAR,LVNTMP 
      COMMON /CIRDAT/ LOCATE(50),JELCNT(50),NUNODS,NCNODS,NUMNOD,NSTOP, 
     1   NUT,NLT,NXTRM,NDIST,NTLIN,IBR,NUMVS
      COMMON /STATUS/ OMEGA,TIME,DELTA,DELOLD(7),AG(7),VT,XNI,EGFET,
     1   XMU,MODE,MODEDC,ICALC,INITF,METHOD,IORD,MAXORD,NONCON,ITERNO,
     2   ITEMNO,NOSOLV,MODAC,IPIV,IVMFLG,IPOSTP,ISCRCH,IOFILE 
      COMMON /KNSTNT/ TWOPI,XLOG2,XLOG10,ROOT2,RAD,BOLTZ,CHARGE,CTOK, 
     1   GMIN,RELTOL,ABSTOL,VNTOL,TRTOL,CHGTOL,EPS0,EPSSIL,EPSOX, 
     2   PIVTOL,PIVREL
      COMMON /MISCEL/ ATIME,APROG(3),ADATE,ATITLE(10),DEFL,DEFW,DEFAD,
     1  DEFAS,RSTATS(50),IWIDTH,LWIDTH,NOPAGE 
      COMMON /DC/ TCSTAR(2),TCSTOP(2),TCINCR(2),ICVFLG,ITCELM(2),KSSOP, 
     1   KINEL,KIDIN,KOVAR,KIDOUT 
      COMMON /AC/ FSTART,FSTOP,FINCR,SKW2,REFPRL,SPW2,JACFLG,IDFREQ,
     1   INOISE,NOSPRT,NOSOUT,NOSIN,IDIST,IDPRT 
      COMMON /BLANK/ VALUE(64)
      INTEGER NODPLC(64)
      COMPLEX CVALUE(32)
      EQUIVALENCE (VALUE(1),NODPLC(1),CVALUE(1))
      LOGICAL MEMPTR
$PAGE 
      DIMENSION OPTITL(4) 
      DIMENSION ANAM(12),AV1(12),AI1(12),REQ(12)
      DIMENSION AMOD(12),VD(12),CAP(12) 
      DIMENSION CB(12),CC(12),VBE(12),VBC(12),VCE(12),RPI(12),
     1   RO(12),CPI(12),CMU(12),BETADC(12),BETAAC(12),FT(12), 
     2   CCS(12),CBX(12),RX(12) 
      DIMENSION CG(12),VGS(12),VDS(12),GDS(12),VBS(12),CBD(12),CBS(12), 
     2  CGSOV(12),CGDOV(12),CGBOV(12),VTH(12),VDSAT(12),CD(12),GM(12),
     3  CGGB(12),CGDB(12),CGSB(12),CBGB(12),CBDB(12),CBSB(12),
     4  GMB(12) 
      DIMENSION CGS(12),CGD(12),CGB(12),CDS(12) 
      EQUIVALENCE(CB(1),CG(1)),(CC(1),VGS(1)),(VBE(1),VDS(1)),
     1(VBC(1),GDS(1)),(VCE(1),VBS(1)),(RPI(1),CBD(1)),
     2(RO(1),CBS(1)),(CPI(1),CGSOV(1)),(CMU(1),CGDOV(1)), 
     3(BETADC(1),CGBOV(1)),(BETAAC(1),VTH(1)),(FT(1),VDSAT(1)), 
     4(CCS(1),CD(1)),(CBX(1),CGGB(1)),(RX(1),CGDB(1)) 
      EQUIVALENCE(VD(1),CG(1)),(CAP(1),VGS(1)),(AV1(1),VDS(1)), 
     1  (AI1(1),GDS(1)),(REQ(1),VBS(1)) 
      EQUIVALENCE (CGS(1),CGGB(1)),(CGD(1),CGDB(1)),(CGB(1),CGSB(1)), 
     1  (CDS(1),CBGB(1))
      DIMENSION AFMT1(3),AFMT2(2),AFMT3(3),AFMT4(3) 
      DATA OPTITL / 8HOPERATIN, 8HG POINT , 8HINFORMAT, 8HION      /
      DATA AV,AVD,AVBE,AVBC,AVCE,AVGS,AVDS,AVBS / 1HV,2HVD,3HVBE,3HVBC, 
     1   3HVCE,3HVGS,3HVDS,3HVBS /
      DATA ACNTRV,ACNTRI,ASRCV,ASRCI,ATRANG,ATRANR,AVGAIN,AIGAIN /
     1   8HV-CONTRL, 8HI-CONTRL, 8HV-SOURCE, 8HI-SOURCE,
     2   8HTRANS-G , 8HTRANS-R , 8HV GAIN  , 8HI GAIN   / 
      DATA AI,AID,AIB,AIC,AIG / 1HI,2HID,2HIB,2HIC,2HIG / 
      DATA AREQ,ARPI,ARO / 3HREQ,3HRPI,2HRO / 
      DATA ACAP,ACPI,ACMU,ACGS,ACGD,ACBD,ACBS / 3HCAP,3HCPI,3HCMU,3HCGS,
     1   3HCGD,3HCBD,3HCBS /
      DATA ACGSOV,ACGDOV,ACGBOV /6HCGSOVL,6HCGDOVL,6HCGBOVL/
      DATA ACGGB,ACGDB,ACGSB,ACBGB,ACBDB,ACBSB /7HDQGDVGB,7HDQGDVDB,
     1  7HDQGDVSB,7HDQBDVGB,7HDQBDVDB,7HDQBDVSB/
      DATA ACGB,ACDS / 3HCGB,3HCDS /
      DATA AVTH, AVDSAT / 3HVTH, 5HVDSAT /
      DATA AGM,AGDS / 2HGM,3HGDS /
      DATA AGMB / 4HGMB / 
      DATA ACCS,ACBX,ARX /3HCCS,3HCBX,2HRX/ 
      DATA ABETAD,ABETAA / 6HBETADC,6HBETAAC /
      DATA AFT / 2HFT / 
C 
      DATA ABLNK /1H /
      DATA AFMT1 /8H(//1H0,1,8H0X,  (2X,8H,A8))   / 
      DATA AFMT2 /8H(1H ,A8,,8H  F10.3)/
      DATA AFMT3 /8H(1H ,A8,,8H1P  E10.,8H2)      / 
      DATA AFMT4 /8H('0MODEL,8H   ',  (,8H2X,A8)) / 
$PAGE 
C 
C.. FIX-UP THE FORMAT STATEMENTS
C 
      KNTR=12 
      IF (LWIDTH.LE.80) KNTR=7
      IPOS=12 
      CALL MOVE(AFMT1,IPOS,ABLNK,1,2) 
      CALL ALFNUM(KNTR,AFMT1,IPOS)
      IPOS=9
      CALL MOVE(AFMT2,IPOS,ABLNK,1,2) 
      CALL ALFNUM(KNTR,AFMT2,IPOS)
      IPOS=11 
      CALL MOVE(AFMT3,IPOS,ABLNK,1,2) 
      CALL ALFNUM(KNTR,AFMT3,IPOS)
      IPOS=14 
      CALL MOVE(AFMT4,IPOS,ABLNK,1,2) 
      CALL ALFNUM(KNTR,AFMT4,IPOS)
C 
C  COMPUTE VOLTAGE SOURCE CURRENTS AND POWER DISSIPATION
C 
      CALL SECOND(T1) 
      IF ((MODE.EQ.1).AND.(MODEDC.EQ.2).AND.(NOSOLV.NE.0)) GO TO 700
      POWER=0.0D0 
      IF (JELCNT(9).EQ.0) GO TO 50
      ITITLE=0
   11 FORMAT (////5X,'VOLTAGE SOURCE CURRENTS'//5X,'NAME',
     1   7X,'CURRENT'/) 
      LOC=LOCATE(9) 
   20 IF (LOC.EQ.0) GO TO 50
      LOCV=NODPLC(LOC+1)
      IPTR=NODPLC(LOC+6)
      CREAL=VALUE(LVNIM1+IPTR)
      POWER=POWER-CREAL*VALUE(LOCV+1) 
      IF (ITITLE.EQ.0) WRITE (6,11) 
      ITITLE=1
      WRITE (6,21) VALUE(LOCV),CREAL
   21 FORMAT (/5X,A8,1X,1PD10.3)
   30 LOC=NODPLC(LOC) 
      GO TO 20
   50 LOC=LOCATE(10)
   60 IF (LOC.EQ.0) GO TO 90
      LOCV=NODPLC(LOC+1)
      NODE1=NODPLC(LOC+2) 
      NODE2=NODPLC(LOC+3) 
      POWER=POWER-VALUE(LOCV+1) 
     1   *(VALUE(LVNIM1+NODE1)-VALUE(LVNIM1+NODE2)) 
      LOC=NODPLC(LOC) 
      GO TO 60
   90 WRITE (6,91) POWER
   91 FORMAT (//5X,'TOTAL POWER DISSIPATION  ',1PD9.2,'  WATTS')
$PAGE 
C 
C  SMALL SIGNAL DEVICE PARAMETERS 
C 
      NUMDEV=JELCNT(5)+JELCNT(6)+JELCNT(7)+JELCNT(8)+JELCNT(11) 
     1   +JELCNT(12)+JELCNT(13)+JELCNT(14)
      IF (NUMDEV.EQ.0) GO TO 600
      CALL TITLE(0,LWIDTH,1,OPTITL) 
      KNTLIM=LWIDTH/11
C 
C  NONLINEAR VOLTAGE CONTROLLED CURRENT SOURCES 
C 
      IF (JELCNT(5).EQ.0) GO TO 175 
      ITITLE=0
  111 FORMAT(1H0,/,'0**** VOLTAGE-CONTROLLED CURRENT SOURCES')
      LOC=LOCATE(5) 
      KNTR=0
  120 IF (LOC.EQ.0) GO TO 140 
      KNTR=KNTR+1 
      LOCV=NODPLC(LOC+1)
      LOCT=LX0+NODPLC(LOC+12) 
      ANAM(KNTR)=VALUE(LOCV)
      AI1(KNTR)=VALUE(LOCT) 
      IF (KNTR.GE.KNTLIM) GO TO 150 
  130 LOC=NODPLC(LOC) 
      GO TO 120 
  140 IF (KNTR.EQ.0) GO TO 175
  150 IF (ITITLE.EQ.0) WRITE (6,111)
      ITITLE=1
      WRITE (6,AFMT1) (ANAM(I),I=1,KNTR)
      WRITE (6,AFMT3) ASRCI,(AI1(I),I=1,KNTR) 
      KNTR=0
      IF (LOC.NE.0) GO TO 130 
C 
C  NONLINEAR VOLTAGE CONTROLLED VOLTAGE SOURCES 
C 
  175 IF (JELCNT(6).EQ.0) GO TO 186 
      ITITLE=0
  176 FORMAT(1H0,/,'0**** VOLTAGE-CONTROLLED VOLTAGE SOURCES')
      LOC=LOCATE(6) 
      KNTR=0
  178 IF (LOC.EQ.0) GO TO 182 
      KNTR=KNTR+1 
      LOCV=NODPLC(LOC+1)
      LOCT=LX0+NODPLC(LOC+13) 
      ANAM(KNTR)=VALUE(LOCV)
      AV1(KNTR)=VALUE(LOCT) 
      AI1(KNTR)=VALUE(LOCT+1) 
      IF (KNTR.GE.KNTLIM) GO TO 184 
  180 LOC=NODPLC(LOC) 
      GO TO 178 
  182 IF (KNTR.EQ.0) GO TO 186
  184 IF (ITITLE.EQ.0) WRITE (6,176)
      ITITLE=1
      WRITE (6,AFMT1) (ANAM(I),I=1,KNTR)
      WRITE (6,AFMT2) ASRCV,(AV1(I),I=1,KNTR) 
      WRITE (6,AFMT3) ASRCI,(AI1(I),I=1,KNTR) 
      KNTR=0
      IF (LOC.NE.0) GO TO 180 
C 
C  NONLINEAR CURRENT CONTROLLED CURRENT SOURCES 
C 
  186 IF (JELCNT(7).EQ.0) GO TO 196 
      ITITLE=0
  187 FORMAT(1H0,/,'0**** CURRENT-CONTROLLED CURRENT SOURCES')
      LOC=LOCATE(7) 
      KNTR=0
  188 IF (LOC.EQ.0) GO TO 192 
      KNTR=KNTR+1 
      LOCV=NODPLC(LOC+1)
      LOCT=LX0+NODPLC(LOC+12) 
      ANAM(KNTR)=VALUE(LOCV)
      AI1(KNTR)=VALUE(LOCT) 
      IF (KNTR.GE.KNTLIM) GO TO 194 
  190 LOC=NODPLC(LOC) 
      GO TO 188 
  192 IF (KNTR.EQ.0) GO TO 196
  194 IF (ITITLE.EQ.0) WRITE (6,187)
      ITITLE=1
      WRITE (6,AFMT1) (ANAM(I),I=1,KNTR)
      WRITE (6,AFMT3) ASRCI,(AI1(I),I=1,KNTR) 
      KNTR=0
      IF (LOC.NE.0) GO TO 190 
C 
C  NONLINEAR CURRENT CONTROLLED VOLTAGE SOURCES 
C 
  196 IF (JELCNT(8).EQ.0) GO TO 210 
      ITITLE=0
  197 FORMAT(1H0,/,'0**** CURRENT-CONTROLLED VOLTAGE SOURCES')
      LOC=LOCATE(8) 
      KNTR=0
  198 IF (LOC.EQ.0) GO TO 202 
      KNTR=KNTR+1 
      LOCV=NODPLC(LOC+1)
      LOCT=LX0+NODPLC(LOC+13) 
      ANAM(KNTR)=VALUE(LOCV)
      AV1(KNTR)=VALUE(LOCT) 
      AI1(KNTR)=VALUE(LOCT+1) 
      IF (KNTR.GE.KNTLIM) GO TO 204 
  200 LOC=NODPLC(LOC) 
      GO TO 198 
  202 IF (KNTR.EQ.0) GO TO 210
  204 IF (ITITLE.EQ.0) WRITE (6,197)
      ITITLE=1
      WRITE (6,AFMT1) (ANAM(I),I=1,KNTR)
      WRITE (6,AFMT2) ASRCV,(AV1(I),I=1,KNTR) 
      WRITE (6,AFMT3) ASRCI,(AI1(I),I=1,KNTR) 
      KNTR=0
      IF (LOC.NE.0) GO TO 200 
$PAGE 
C 
C  DIODES 
C 
  210 IF (JELCNT(11).EQ.0) GO TO 300
      ITITLE=0
  211 FORMAT(1H0,/,'0**** DIODES')
      LOC=LOCATE(11)
      KNTR=0
  220 IF (LOC.EQ.0) GO TO 240 
      KNTR=KNTR+1 
      LOCV=NODPLC(LOC+1)
      NODE1=NODPLC(LOC+2) 
      NODE2=NODPLC(LOC+3) 
      LOCM=NODPLC(LOC+5)
      LOCM=NODPLC(LOCM+1) 
      LOCT=LX0+NODPLC(LOC+11) 
      ANAM(KNTR)=VALUE(LOCV)
      AMOD(KNTR)=VALUE(LOCM)
      CD(KNTR)=VALUE(LOCT+1)
      VD(KNTR)=VALUE(LVNIM1+NODE1)-VALUE(LVNIM1+NODE2)
      IF (MODEDC.NE.1) GO TO 225
      REQ(KNTR)=1.0D0/VALUE(LOCT+2) 
      CAP(KNTR)=VALUE(LOCT+4) 
  225 IF (KNTR.GE.KNTLIM) GO TO 250 
  230 LOC=NODPLC(LOC) 
      GO TO 220 
  240 IF (KNTR.EQ.0) GO TO 300
  250 IF (ITITLE.EQ.0) WRITE (6,211)
      ITITLE=1
      WRITE (6,AFMT1) (ANAM(I),I=1,KNTR)
      WRITE (6,AFMT4) (AMOD(I),I=1,KNTR)
      WRITE (6,AFMT3) AID,(CD(I),I=1,KNTR)
      WRITE (6,AFMT2) AVD,(VD(I),I=1,KNTR)
      IF (MODEDC.NE.1) GO TO 260
      WRITE (6,AFMT3) AREQ,(REQ(I),I=1,KNTR)
      WRITE (6,AFMT3) ACAP,(CAP(I),I=1,KNTR)
  260 KNTR=0
      IF (LOC.NE.0) GO TO 230 
$PAGE 
C 
C  BIPOLAR JUNCTION TRANSISTORS 
C 
  300 IF (JELCNT(12).EQ.0) GO TO 400
      ITITLE=0
  301 FORMAT(1H0,/,'0**** BIPOLAR JUNCTION TRANSISTORS')
      LOC=LOCATE(12)
      KNTR=0
  320 IF (LOC.EQ.0) GO TO 340 
      KNTR=KNTR+1 
      LOCV=NODPLC(LOC+1)
      NODE1=NODPLC(LOC+2) 
      NODE2=NODPLC(LOC+3) 
      NODE3=NODPLC(LOC+4) 
      LOCM=NODPLC(LOC+8)
      TYPE=NODPLC(LOCM+2) 
      LOCM=NODPLC(LOCM+1) 
      LOCT=LX0+NODPLC(LOC+22) 
      ANAM(KNTR)=VALUE(LOCV)
      AMOD(KNTR)=VALUE(LOCM)
      CB(KNTR)=TYPE*VALUE(LOCT+3) 
      CC(KNTR)=TYPE*VALUE(LOCT+2) 
      VBE(KNTR)=VALUE(LVNIM1+NODE2)-VALUE(LVNIM1+NODE3) 
      VBC(KNTR)=VALUE(LVNIM1+NODE2)-VALUE(LVNIM1+NODE1) 
      VCE(KNTR)=VBE(KNTR)-VBC(KNTR) 
      BETADC(KNTR)=CC(KNTR)/DSIGN(DMAX1(DABS(CB(KNTR)),1.0D-20),
     1  CB(KNTR)) 
      IF (MODEDC.NE.1) GO TO 325
      RX(KNTR)=0.0D0
      IF (VALUE(LOCT+16).NE.0.0D0) RX(KNTR)=1.0D0/VALUE(LOCT+16)  
      CCS(KNTR)=VALUE(LOCT+13)
      CBX(KNTR)=VALUE(LOCT+15)
      RPI(KNTR)=1.0D0/VALUE(LOCT+4) 
      GM(KNTR)=VALUE(LOCT+6)
      RO(KNTR)=1.0D0/VALUE(LOCT+7)
      CPI(KNTR)=VALUE(LOCT+9) 
      CMU(KNTR)=VALUE(LOCT+11)
      BETAAC(KNTR)=GM(KNTR)*RPI(KNTR) 
      FT(KNTR)=GM(KNTR)/(TWOPI*DMAX1(CPI(KNTR)+CMU(KNTR)+CBX(KNTR), 
     1  1.0D-20)) 
  325 IF (KNTR.GE.KNTLIM) GO TO 350 
  330 LOC=NODPLC(LOC) 
      GO TO 320 
  340 IF (KNTR.EQ.0) GO TO 400
  350 IF (ITITLE.EQ.0) WRITE (6,301)
      ITITLE=1
      WRITE (6,AFMT1) (ANAM(I),I=1,KNTR)
      WRITE (6,AFMT4) (AMOD(I),I=1,KNTR)
      WRITE (6,AFMT3) AIB,(CB(I),I=1,KNTR)
      WRITE (6,AFMT3) AIC,(CC(I),I=1,KNTR)
      WRITE (6,AFMT2) AVBE,(VBE(I),I=1,KNTR)
      WRITE (6,AFMT2) AVBC,(VBC(I),I=1,KNTR)
      WRITE (6,AFMT2) AVCE,(VCE(I),I=1,KNTR)
      WRITE (6,AFMT2) ABETAD,(BETADC(I),I=1,KNTR) 
      IF (MODEDC.NE.1) GO TO 360
      WRITE (6,AFMT3) AGM,(GM(I),I=1,KNTR)
      WRITE (6,AFMT3) ARPI,(RPI(I),I=1,KNTR)
      WRITE(6,AFMT3) ARX,(RX(I),I=1,KNTR) 
      WRITE (6,AFMT3) ARO,(RO(I),I=1,KNTR)
      WRITE (6,AFMT3) ACPI,(CPI(I),I=1,KNTR)
      WRITE (6,AFMT3) ACMU,(CMU(I),I=1,KNTR)
      WRITE(6,AFMT3) ACBX,(CBX(I),I=1,KNTR) 
      WRITE(6,AFMT3) ACCS,(CCS(I),I=1,KNTR) 
      WRITE (6,AFMT2) ABETAA,(BETAAC(I),I=1,KNTR) 
      WRITE (6,AFMT3) AFT,(FT(I),I=1,KNTR)
  360 KNTR=0
      IF (LOC.NE.0) GO TO 330 
C 
C  JFETS
C 
  400 IF (JELCNT(13).EQ.0) GO TO 500
      ITITLE=0
  401 FORMAT(1H0,/,'0**** JFETS') 
      LOC=LOCATE(13)
      KNTR=0
  420 IF (LOC.EQ.0) GO TO 440 
      KNTR=KNTR+1 
      LOCV=NODPLC(LOC+1)
      NODE1=NODPLC(LOC+2) 
      NODE2=NODPLC(LOC+3) 
      NODE3=NODPLC(LOC+4) 
      LOCM=NODPLC(LOC+7)
      TYPE=NODPLC(LOCM+2) 
      LOCM=NODPLC(LOCM+1) 
      LOCT=LX0+NODPLC(LOC+19) 
      ANAM(KNTR)=VALUE(LOCV)
      AMOD(KNTR)=VALUE(LOCM)
      CD(KNTR)=TYPE*(VALUE(LOCT+3)-VALUE(LOCT+4)) 
      VGS(KNTR)=VALUE(LVNIM1+NODE2)-VALUE(LVNIM1+NODE3) 
      VDS(KNTR)=VALUE(LVNIM1+NODE1)-VALUE(LVNIM1+NODE3) 
      IF (MODEDC.NE.1) GO TO 425
      GM(KNTR)=VALUE(LOCT+5)
      GDS(KNTR)=VALUE(LOCT+6) 
      CGS(KNTR)=VALUE(LOCT+9) 
      CGD(KNTR)=VALUE(LOCT+11)
  425 IF (KNTR.GE.KNTLIM) GO TO 450 
  430 LOC=NODPLC(LOC) 
      GO TO 420 
  440 IF (KNTR.EQ.0) GO TO 500
  450 IF (ITITLE.EQ.0) WRITE (6,401)
      ITITLE=1
      WRITE (6,AFMT1) (ANAM(I),I=1,KNTR)
      WRITE (6,AFMT4) (AMOD(I),I=1,KNTR)
      WRITE (6,AFMT3) AID,(CD(I),I=1,KNTR)
      WRITE (6,AFMT2) AVGS,(VGS(I),I=1,KNTR)
      WRITE (6,AFMT2) AVDS,(VDS(I),I=1,KNTR)
      IF (MODEDC.NE.1) GO TO 460
      WRITE (6,AFMT3) AGM,(GM(I),I=1,KNTR)
      WRITE (6,AFMT3) AGDS,(GDS(I),I=1,KNTR)
      WRITE (6,AFMT3) ACGS,(CGS(I),I=1,KNTR)
      WRITE (6,AFMT3) ACGD,(CGD(I),I=1,KNTR)
  460 KNTR=0
      IF (LOC.NE.0) GO TO 430 
C 
C  MOSFETS
C 
  500 IF (JELCNT(14).EQ.0) GO TO 600
      ITITLE=0
  501 FORMAT(1H0,/,'0**** MOSFETS') 
      LOC=LOCATE(14)
      KNTR=0
  520 IF (LOC.EQ.0) GO TO 540 
      KNTR=KNTR+1 
      LOCV=NODPLC(LOC+1)
      NODE1=NODPLC(LOC+2) 
      NODE2=NODPLC(LOC+3) 
      NODE3=NODPLC(LOC+4) 
      NODE4=NODPLC(LOC+5) 
      NODE5=NODPLC(LOC+6) 
      NODE6=NODPLC(LOC+7) 
      LOCM=NODPLC(LOC+8)
      TYPE=NODPLC(LOCM+2) 
      LOCM=NODPLC(LOCM+1) 
      LOCT=LX0+NODPLC(LOC+26) 
      ANAM(KNTR)=VALUE(LOCV)
      AMOD(KNTR)=VALUE(LOCM)
      CD(KNTR)=TYPE*VALUE(LOCT+4) 
      VGS(KNTR)=VALUE(LVNIM1+NODE2)-VALUE(LVNIM1+NODE3) 
      VDS(KNTR)=VALUE(LVNIM1+NODE1)-VALUE(LVNIM1+NODE3) 
      VBS(KNTR)=VALUE(LVNIM1+NODE4)-VALUE(LVNIM1+NODE3) 
      IF (MODEDC.NE.1) GO TO 525
      XL=VALUE(LOCV+1)-2.0D0*VALUE(LOCM+28) 
      XW=VALUE(LOCV+2)
      COVLGS=VALUE(LOCM+13)*XW
      COVLGD=VALUE(LOCM+14)*XW
      COVLGB=VALUE(LOCM+15)*XL
      XQCO=VALUE(LOCM+35) 
      DEVMOD=VALUE(LOCV+8)
      VDSAT(KNTR)=VALUE(LOCV+10)
      VTH(KNTR)=VALUE(LOCV+9) 
      GM(KNTR)=VALUE(LOCT+7)
      GDS(KNTR)=VALUE(LOCT+8) 
      GMB(KNTR)=VALUE(LOCT+9) 
      IF (DEVMOD.GT.0.0D0) GO TO 521  
      VTH(KNTR)=VALUE(LOCV+9) 
  521 CBD(KNTR)=VALUE(LOCT+24)
      CBS(KNTR)=VALUE(LOCT+26)
      CGSOV(KNTR)=COVLGS
      CGDOV(KNTR)=COVLGD
      CGBOV(KNTR)=COVLGB
      IF (XQCO.GT.0.5D0) GO TO 522
      CGGB(KNTR)=VALUE(LOCT+18) 
      CGDB(KNTR)=VALUE(LOCT+19) 
      CGSB(KNTR)=VALUE(LOCT+20) 
      CBGB(KNTR)=VALUE(LOCT+21) 
      CBDB(KNTR)=VALUE(LOCT+22) 
      CBSB(KNTR)=VALUE(LOCT+23) 
      GO TO 525 
  522 CGS(KNTR)=VALUE(LOCT+12)
      CGD(KNTR)=VALUE(LOCT+14)
      CGB(KNTR)=VALUE(LOCT+16)
  525 IF (KNTR.GE.KNTLIM) GO TO 550 
  530 LOC=NODPLC(LOC) 
      GO TO 520 
  540 IF (KNTR.EQ.0) GO TO 600
  550 IF (ITITLE.EQ.0) WRITE (6,501)
      ITITLE=1
      WRITE (6,AFMT1) (ANAM(I),I=1,KNTR)
      WRITE (6,AFMT4) (AMOD(I),I=1,KNTR)
      IF (TYPE.EQ.0.0D0) GO TO 555  
      WRITE (6,AFMT3) AID,(CD(I),I=1,KNTR)
      WRITE (6,AFMT2) AVGS,(VGS(I),I=1,KNTR)
      WRITE (6,AFMT2) AVDS,(VDS(I),I=1,KNTR)
      WRITE (6,AFMT2) AVBS,(VBS(I),I=1,KNTR)
      IF (MODEDC.NE.1) GO TO 560
      WRITE (6,AFMT2) AVTH,(VTH(I),I=1,KNTR)
      WRITE (6,AFMT2) AVDSAT,(VDSAT(I),I=1,KNTR)
      WRITE (6,AFMT3) AGM,(GM(I),I=1,KNTR)
      WRITE (6,AFMT3) AGDS,(GDS(I),I=1,KNTR)
      WRITE (6,AFMT3) AGMB,(GMB(I),I=1,KNTR)
      WRITE (6,AFMT3) ACBD,(CBD(I),I=1,KNTR)
      WRITE (6,AFMT3) ACBS,(CBS(I),I=1,KNTR)
      WRITE (6,AFMT3) ACGSOV,(CGSOV(I),I=1,KNTR)
      WRITE (6,AFMT3) ACGDOV,(CGDOV(I),I=1,KNTR)
      WRITE (6,AFMT3) ACGBOV,(CGBOV(I),I=1,KNTR)
      IF (XQCO.GT.0.5D0) GO TO 552
      WRITE(6,551)
  551 FORMAT(' DERIVATIVES OF GATE (DQGDVX) AND BULK (DQBDVX) CHARGES') 
      WRITE (6,AFMT3) ACGGB,(CGGB(I),I=1,KNTR)
      WRITE (6,AFMT3) ACGDB,(CGDB(I),I=1,KNTR)
      WRITE (6,AFMT3) ACGSB,(CGSB(I),I=1,KNTR)
      WRITE (6,AFMT3) ACBGB,(CBGB(I),I=1,KNTR)
      WRITE (6,AFMT3) ACBDB,(CBDB(I),I=1,KNTR)
      WRITE (6,AFMT3) ACBSB,(CBSB(I),I=1,KNTR)
      GO TO 560 
  552 WRITE (6,AFMT3) ACGS,(CGS(I),I=1,KNTR)
      WRITE (6,AFMT3) ACGD,(CGD(I),I=1,KNTR)
      WRITE (6,AFMT3) ACGB,(CGB(I),I=1,KNTR)
      GO TO 560 
  555 WRITE(6,AFMT3) AID,(CD(I),I=1,KNTR) 
      WRITE(6,AFMT3) AIG,(CG(I),I=1,KNTR) 
      WRITE (6,AFMT2) AVGS,(VGS(I),I=1,KNTR)
      WRITE (6,AFMT2) AVDS,(VDS(I),I=1,KNTR)
      WRITE (6,AFMT2) AVBS,(VBS(I),I=1,KNTR)
      IF (MODEDC.NE.1) GO TO 560
      WRITE (6,AFMT3) AGM,(GM(I),I=1,KNTR)
      WRITE (6,AFMT3) AGDS,(GDS(I),I=1,KNTR)
      WRITE (6,AFMT3) ACGS,(CGS(I),I=1,KNTR)
      WRITE (6,AFMT3) ACGD,(CGD(I),I=1,KNTR)
      WRITE (6,AFMT3) ACGB,(CGB(I),I=1,KNTR)
      WRITE (6,AFMT3) ACDS,(CDS(I),I=1,KNTR)
  560 KNTR=0
      IF (LOC.NE.0) GO TO 530 
C 
C  OPERATING POINT ANALYSES 
C 
  600 IF (MODEDC.NE.1) GO TO 700
      IF (KINEL.EQ.0) GO TO 610 
      CALL SSTF 
  610 IF (NSENS.EQ.0) GO TO 700 
      CALL SENCAL 
C 
C  FINISHED 
C 
  700 IF (MODEDC.EQ.2) GO TO 710
      IF (JACFLG.NE.0) GO TO 705
      CALL CLRMEM(LVNIM1) 
      CALL CLRMEM(LX0)
  705 CALL CLRMEM(LVN)
      CALL CLRMEM(LVNTMP) 
      IF (MEMPTR(MACINS)) CALL CLRMEM(MACINS) 
  710 CALL SECOND(T2) 
      RSTATS(5)=RSTATS(5)+T2-T1 
      RETURN
      END 
$EMA /BLANK/                            
      SUBROUTINE OUTNAM( LOC , KTYPE , STRING , IPOS )
     + ,92091-16006 REV.5000 <890418.1141>  
      IMPLICIT REAL*8 (A-H,O-Z) 
C 
C     THIS ROUTINE CONSTRUCTS THE 'NAME' FOR THE OUTPUT VARIABLE INDI-
C CATED BY LOC, ADDING THE CHARACTERS TO THE CHARACTER ARRAY 'STRING',
C BEGINNING WITH THE POSITION MARKED BY IPOS. 
C 
      COMMON /TABINF/ IELMNT,ISBCKT,NSBCKT,IUNSAT,NUNSAT,ITEMPS,NUMTEM, 
     1   ISENS,NSENS,IFOUR,NFOUR,IFIELD,ICODE,IDELIM,ICOLUM,INSIZE, 
     2   JUNODE,LSBKPT,NUMBKP,IORDER,JMNODE,IUR,IUC,ILC,ILR,NUMOFF,ISR, 
     3   NMOFFC,ISEQ,ISEQ1,NEQN,NODEVS,NDIAG,ISWAP,IEQUA,MACINS,LVNIM1, 
     4   LX0,LVN,LYNL,LYU,LYL,LX1,LX2,LX3,LX4,LX5,LX6,LX7,LD0,LD1,LTD,
     5   IMYNL,IMVN,LCVN,NSNOD,NSMAT,NSVAL,ICNOD,ICMAT,ICVAL, 
     6   LOUTPT,LPOL,LZER,IRSWPF,IRSWPR,ICSWPF,ICSWPR,IRPT,JCPT,
     7   IROWNO,JCOLNO,NTTBR,NTTAR,LVNTMP 
      COMMON /BLANK/ VALUE(64)
      INTEGER NODPLC(64)
      COMPLEX CVALUE(32)
      EQUIVALENCE (VALUE(1),NODPLC(1),CVALUE(1))
C 
      DIMENSION STRING(1) 
      DIMENSION AOUT(19),LENOUT(19),AOPT(5),LENOPT(5) 
      DATA AOUT / 6HV     , 6HVM    , 6HVR    , 6HVI    , 6HVP    , 
     1            6HVDB   , 6HI     , 6HIM    , 6HIR    , 6HII    , 
     2            6HIP    , 6HIDB   , 6HONOISE, 6HINOISE, 6HHD2   , 
     1            6HHD3   , 6HDIM2  , 6HSIM2  , 6HDIM3   /
      DATA LENOUT / 1,2,2,2,2,3,1,2,2,2,2,3,6,6,3,3,4,4,4 / 
********************************************************************
* 
      DATA AOPT / 1HM , 1HR , 1HI , 1HP , 2HDB /
      DATA LENOPT / 1,1,1,1,2 / 
* 
********************************************************************
      DATA ALPRN, ACOMMA, ARPRN, ABLNK / 1H(, 1H,, 1H), 1H  / 
$PAGE 
      IOUTYP=NODPLC(LOC+5)
      IF (IOUTYP.GE.2) GO TO 10 
      LOUT=KTYPE+IOUTYP*6 
      GO TO 20
   10 LOUT=IOUTYP+11
   20 CALL MOVE(STRING,IPOS,AOUT(LOUT),1,LENOUT(LOUT))
      IPOS=IPOS+LENOUT(LOUT)
      IF (IOUTYP.GE.2) GO TO 200
      CALL MOVE(STRING,IPOS,ALPRN,1,1)
      IPOS=IPOS+1 
      IF (IOUTYP.NE.0) GO TO 100
      NODE1=NODPLC(LOC+2) 
      CALL ALFNUM(NODPLC(JUNODE+NODE1),STRING,IPOS) 
      NODE2=NODPLC(LOC+3) 
      IF (NODE2.EQ.1) GO TO 30
      CALL MOVE(STRING,IPOS,ACOMMA,1,1) 
      IPOS=IPOS+1 
      CALL ALFNUM(NODPLC(JUNODE+NODE2),STRING,IPOS) 
   30 CALL MOVE(STRING,IPOS,ARPRN,1,1)
      IPOS=IPOS+1 
      GO TO 1000
C 
  100 LOCV=NODPLC(LOC+1)
      ANAM=VALUE(LOCV)
      ACHAR=ABLNK 
      DO 110 I=1,8
      CALL MOVE(ACHAR,1,ANAM,I,1) 
      IF (IXXOR(ACHAR,ABLNK).EQ.0) GO TO 120  
      CALL MOVE(STRING,IPOS,ACHAR,1,1)
      IPOS=IPOS+1 
  110 CONTINUE
  120 CALL MOVE(STRING,IPOS,ARPRN,1,1)
      IPOS=IPOS+1 
      GO TO 1000
C 
  200 IF (KTYPE.EQ.1) GO TO 1000
      CALL MOVE(STRING,IPOS,ALPRN,1,1)
      IPOS=IPOS+1 
      CALL MOVE(STRING,IPOS,AOPT(KTYPE-1),1,LENOPT(KTYPE-1))
      IPOS=IPOS+LENOPT(KTYPE-1) 
      CALL MOVE(STRING,IPOS,ARPRN,1,1)
      IPOS=IPOS+1 
C 
C  FINISHED 
C 
 1000 RETURN
      END 
$EMA /BLANK/                            
      SUBROUTINE SENCAL 
     + ,92091-16006 REV.5000 <890418.1141>  
      IMPLICIT REAL*8 (A-H,O-Z) 
C 
C     THIS ROUTINE COMPUTES THE DC SENSITIVITIES OF CIRCUIT ELEMENTS
C WITH RESPECT TO USER SPECIFIED OUTPUTS. 
C 
      COMMON /TABINF/ IELMNT,ISBCKT,NSBCKT,IUNSAT,NUNSAT,ITEMPS,NUMTEM, 
     1   ISENS,NSENS,IFOUR,NFOUR,IFIELD,ICODE,IDELIM,ICOLUM,INSIZE, 
     2   JUNODE,LSBKPT,NUMBKP,IORDER,JMNODE,IUR,IUC,ILC,ILR,NUMOFF,ISR, 
     3   NMOFFC,ISEQ,ISEQ1,NEQN,NODEVS,NDIAG,ISWAP,IEQUA,MACINS,LVNIM1, 
     4   LX0,LVN,LYNL,LYU,LYL,LX1,LX2,LX3,LX4,LX5,LX6,LX7,LD0,LD1,LTD,
     5   IMYNL,IMVN,LCVN,NSNOD,NSMAT,NSVAL,ICNOD,ICMAT,ICVAL, 
     6   LOUTPT,LPOL,LZER,IRSWPF,IRSWPR,ICSWPF,ICSWPR,IRPT,JCPT,
     7   IROWNO,JCOLNO,NTTBR,NTTAR,LVNTMP 
      COMMON /CIRDAT/ LOCATE(50),JELCNT(50),NUNODS,NCNODS,NUMNOD,NSTOP, 
     1   NUT,NLT,NXTRM,NDIST,NTLIN,IBR,NUMVS
      COMMON /STATUS/ OMEGA,TIME,DELTA,DELOLD(7),AG(7),VT,XNI,EGFET,
     1   XMU,MODE,MODEDC,ICALC,INITF,METHOD,IORD,MAXORD,NONCON,ITERNO,
     2   ITEMNO,NOSOLV,MODAC,IPIV,IVMFLG,IPOSTP,ISCRCH,IOFILE 
      COMMON /MISCEL/ ATIME,APROG(3),ADATE,ATITLE(10),DEFL,DEFW,DEFAD,
     1  DEFAS,RSTATS(50),IWIDTH,LWIDTH,NOPAGE 
      COMMON /FLAGS/ IPRNTA,IPRNTL,IPRNTM,IPRNTN,IPRNTO,LIMTIM,LIMPTS,
     1   LVLCOD,LVLTIM,ITL1,ITL2,ITL3,ITL4,ITL5,IGOOF,NOGO,KEOF 
      COMMON /DC/ TCSTAR(2),TCSTOP(2),TCINCR(2),ICVFLG,ITCELM(2),KSSOP, 
     1   KINEL,KIDIN,KOVAR,KIDOUT 
      COMMON /BLANK/ VALUE(64)
      INTEGER NODPLC(64)
      COMPLEX CVALUE(32)
      EQUIVALENCE (VALUE(1),NODPLC(1),CVALUE(1))
C 
      DIMENSION STRING(5),SENTIT(4) 
      DATA ALSRS,ALSIS,ALSN,ALSRB,ALSRC,ALSRE / 2HRS,2HIS,1HN,2HRB,2HRC,
     1   2HRE / 
      DATA ALSBF,ALSC2,ALSBR,ALSC4,ALSNE,ALSNC,ALSIK,ALSIKR,ALSVA,ALSVB 
     1   / 2HBF,3HJLE,2HBR,3HJLC,3HNLE,3HNLC,3HJBF,3HJBR,3HVBF,3HVBR/ 
      DATA ALSJS /2HJS/ 
      DATA SENTIT / 8HDC SENSI, 8HTIVITY A, 8HNALYSIS , 8H         /
      DATA ABLNK / 1H  /
C 
      IF (KINEL.NE.0) GO TO 8 
    4 CALL DCDCMP 
$PAGE 
    8 DO 1000 N=1,NSENS 
C 
C  PREPARE ADJOINT EXCITATION VECTOR
C 
      CALL ZERO8(VALUE(LVN+1),NSTOP)
      LOCS=NODPLC(ISENS+N)
      IOUTYP=NODPLC(LOCS+5) 
      IF (IOUTYP.NE.0) GO TO 10 
C 
C...  VOLTAGE OUTPUT
C 
      IVOLTS=1
      NOPOSO=NODPLC(LOCS+2) 
      NONEGO=NODPLC(LOCS+3) 
      VALUE(LVN+NOPOSO)=-1.0D0
      VALUE(LVN+NONEGO)=+1.0D0
      GO TO 20
C 
C...  CURRENT OUTPUT (THROUGH VOLTAGE SOURCE) 
C 
   10 IPTRO=NODPLC(LOCS+2)
      IVOLTS=0
      IPTRO=NODPLC(IPTRO+6) 
      VALUE(LVN+IPTRO)=-1.0D0 
C 
C  OBTAIN ADJOINT SOLUTION BY DOING FORWARD/BACKWARD SUBSTITUTION ON
C  THE TRANSPOSE OF THE Y MATRIX
C 
   20 CALL ASOL 
      VALUE(LVN+1)=0.0D0
C 
C  REAL SOLUTION IN LVNIM1;  ADJOINT SOLUTION IN LVN ...
C 
      CALL TITLE(0,LWIDTH,1,SENTIT) 
      IPOS=1
      CALL OUTNAM(LOCS,1,STRING,IPOS) 
      CALL MOVE(STRING,IPOS,ABLNK,1,7)
      JSTOP=(IPOS+6)/8
      WRITE (6,36) (STRING(J),J=1,JSTOP)
   36 FORMAT('0DC SENSITIVITIES OF OUTPUT ',5A8)
      IF (IVOLTS.NE.0) WRITE (6,41) 
      IF (IVOLTS.EQ.0) WRITE(6,42)
   41 FORMAT(1H0,8X,'ELEMENT',9X,'ELEMENT',7X,'ELEMENT',7X,'NORMALIZED'/
     1   10X,'NAME',12X,'VALUE',6X,'SENSITIVITY    SENSITIVITY'/35X,
     2   ' (VOLTS/UNIT) (VOLTS/PERCENT)'/)
   42 FORMAT(1H0,8X,'ELEMENT',9X,'ELEMENT',7X,'ELEMENT',7X,'NORMALIZED'/
     1   10X,'NAME',12X,'VALUE',6X,'SENSITIVITY    SENSITIVITY'/35X,
     2   '  (AMPS/UNIT)  (AMPS/PERCENT)'/)
$PAGE 
C 
C  RESISTORS
C 
      LOC=LOCATE(1) 
  100 IF (LOC.EQ.0) GO TO 110 
      LOCV=NODPLC(LOC+1)
      NODE1=NODPLC(LOC+2) 
      NODE2=NODPLC(LOC+3) 
      VAL=1.0D0/VALUE(LOCV+1) 
      SENS=-(VALUE(LVNIM1+NODE1)-VALUE(LVNIM1+NODE2))*
     1      (VALUE(LVN   +NODE1)-VALUE(LVN   +NODE2))/(VAL*VAL) 
      SENSN=VAL*SENS/100.0D0
      WRITE (6,101) VALUE(LOCV),VAL,SENS,SENSN
  101 FORMAT(10X,A8,4X,1PD10.3,5X,D10.3,5X,D10.3) 
  105 LOC=NODPLC(LOC) 
      GO TO 100 
C 
C  VOLTAGE SOURCES
C 
  110 LOC=LOCATE(9) 
  140 IF (LOC.EQ.0) GO TO 150 
      LOCV=NODPLC(LOC+1)
      VAL=VALUE(LOCV+1) 
      IPTRV=NODPLC(LOC+6) 
      SENS=-VALUE(LVN+IPTRV)
      SENSN=VAL*SENS/100.0D0
      WRITE (6,101) VALUE(LOCV),VAL,SENS,SENSN
  145 LOC=NODPLC(LOC) 
      GO TO 140 
C 
C  CURRENT SOURCES
C 
  150 LOC=LOCATE(10)
  160 IF (LOC.EQ.0) GO TO 170 
      LOCV=NODPLC(LOC+1)
      NODE1=NODPLC(LOC+2) 
      NODE2=NODPLC(LOC+3) 
      VAL=VALUE(LOCV+1) 
      SENS=VALUE(LVN+NODE1)-VALUE(LVN+NODE2)
      SENSN=VAL*SENS/100.0D0
      WRITE (6,101) VALUE(LOCV),VAL,SENS,SENSN
  165 LOC=NODPLC(LOC) 
      GO TO 160 
$PAGE 
C 
C  DIODES 
C 
  170 LOC=LOCATE(11)
  180 IF (LOC.EQ.0) GO TO 210 
      LOCV=NODPLC(LOC+1)
      WRITE (6,181) VALUE(LOCV) 
  181 FORMAT(1X,A8) 
      NODE1=NODPLC(LOC+2) 
      NODE2=NODPLC(LOC+3) 
      NODE3=NODPLC(LOC+4) 
      LOCM=NODPLC(LOC+5)
      LOCM=NODPLC(LOCM+1) 
      AREA=VALUE(LOCV+1)
C 
C  SERIES RESISTANCE (RS) 
C 
      VAL=VALUE(LOCM+2)*AREA
      IF (VAL.NE.0.0D0) GO TO 190 
      WRITE (6,186) ALSRS 
  186 FORMAT(10X,A8,5X,2H0.,13X,2H0.,13X,2H0.)
      GO TO 200 
  190 VAL=1.0D0/VAL 
      SENS=-(VALUE(LVNIM1+NODE1)-VALUE(LVNIM1+NODE3))*
     1      (VALUE(LVN   +NODE1)-VALUE(LVN   +NODE3))/(VAL*VAL) 
      SENSN=VAL*SENS/100.0D0
      WRITE (6,101) ALSRS,VAL,SENS,SENSN
C 
C  INTRINSIC PARAMETERS 
C 
  200 CSAT=VALUE(LOCM+1)*AREA 
      XN=VALUE(LOCM+3)
      VBE=VALUE(LVNIM1+NODE3)-VALUE(LVNIM1+NODE2) 
      VTE=XN*VT 
      EVBE=DEXP(VBE/VTE)
      VABE=VALUE(LVN+NODE3)-VALUE(LVN+NODE2)
C 
C  SATURATION CURRENT (IS)
C 
      SENS=VABE*(EVBE-1.0D0)
      SENSN=CSAT*SENS/100.0D0 
      WRITE (6,101) ALSIS,CSAT,SENS,SENSN 
C 
C  IDEALITY FACTOR (N)
C 
      SENS=-VABE*(CSAT/XN)*(VBE/VTE)*EVBE 
      IF (DABS(SENS).LT.1.0D-30) SENS=0.0D0 
      SENSN=XN*SENS/100.0D0 
      WRITE (6,101) ALSN,XN,SENS,SENSN
  205 LOC=NODPLC(LOC) 
      GO TO 180 
$PAGE 
C 
C  BIPOLAR JUNCTION TRANSISTORS 
C 
  210 LOC=LOCATE(12)
  220 IF (LOC.EQ.0) GO TO 1000
      LOCV=NODPLC(LOC+1)
      WRITE (6,181) VALUE(LOCV) 
      NODE1=NODPLC(LOC+2) 
      NODE2=NODPLC(LOC+3) 
      NODE3=NODPLC(LOC+4) 
      NODE4=NODPLC(LOC+5) 
      NODE5=NODPLC(LOC+6) 
      NODE6=NODPLC(LOC+7) 
      LOCM=NODPLC(LOC+8)
      TYPE=NODPLC(LOCM+2) 
      LOCM=NODPLC(LOCM+1) 
      LOCT=LX0+NODPLC(LOC+22) 
      AREA=VALUE(LOCV+1)
C 
C  BASE RESISTANCE (RB) 
C 
      VAL=VALUE(LOCT+16)
      IF (VAL.NE.0.0D0) GO TO 230 
      WRITE (6,186) ALSRB 
      GO TO 240 
  230 VAL=1.0D0/VAL 
      SENS=-(VALUE(LVNIM1+NODE2)-VALUE(LVNIM1+NODE5))*
     1      (VALUE(LVN   +NODE2)-VALUE(LVN   +NODE5))/(VAL*VAL) 
      SENSN=VAL*SENS/100.0D0
      WRITE (6,101) ALSRB,VAL,SENS,SENSN
C 
C  COLLECTOR RESISTANCE (RC)
C 
  240 VAL=VALUE(LOCM+20)*AREA 
      IF (VAL.NE.0.0D0) GO TO 250 
      WRITE (6,186) ALSRC 
      GO TO 260 
  250 VAL=1.0D0/VAL 
      SENS=-(VALUE(LVNIM1+NODE1)-VALUE(LVNIM1+NODE4))*
     1      (VALUE(LVN   +NODE1)-VALUE(LVN   +NODE4))/(VAL*VAL) 
      SENSN=VAL*SENS/100.0D0
      WRITE (6,101) ALSRC,VAL,SENS,SENSN
C 
C  EMITTER RESISTANCE (RE)
C 
  260 VAL=VALUE(LOCM+19)*AREA 
      IF (VAL.NE.0.0D0) GO TO 270 
      WRITE (6,186) ALSRE 
      GO TO 280 
  270 VAL=1.0D0/VAL 
      SENS=-(VALUE(LVNIM1+NODE3)-VALUE(LVNIM1+NODE6))*
     1      (VALUE(LVN   +NODE3)-VALUE(LVN   +NODE6))/(VAL*VAL) 
      SENSN=VAL*SENS/100.0D0
      WRITE (6,101) ALSRE,VAL,SENS,SENSN
$PAGE 
C 
C  INTRINSIC PARAMETERS 
C 
  280 BF=VALUE(LOCM+2)
      BR=VALUE(LOCM+8)
      CSAT=VALUE(LOCM+1)*AREA 
      OVA=VALUE(LOCM+4) 
      OVB=VALUE(LOCM+10)
      OIK=VALUE(LOCM+5)/AREA
      C2=VALUE(LOCM+6)*AREA 
      XNE=VALUE(LOCM+7) 
      VTE=XNE*VT
      OIKR=VALUE(LOCM+11)/AREA
      C4=VALUE(LOCM+12)*AREA
      XNC=VALUE(LOCM+13)
      VTC=XNC*VT
      VBE=TYPE*(VALUE(LVNIM1+NODE5)-VALUE(LVNIM1+NODE6))
      VBC=TYPE*(VALUE(LVNIM1+NODE5)-VALUE(LVNIM1+NODE4))
      VABE=TYPE*(VALUE(LVN+NODE5)-VALUE(LVN+NODE6)) 
      VABC=TYPE*(VALUE(LVN+NODE5)-VALUE(LVN+NODE4)) 
      VACE=VABE-VABC
      IF (VBE.LE.-VT) GO TO 320 
      EVBE=DEXP(VBE/VT/VALUE(LOCM+3)) 
      CBE=CSAT*(EVBE-1.0D0) 
      GBE=CSAT*EVBE/VT/VALUE(LOCM+3)
      IF (C2.NE.0.0D0) GO TO 310
      CBEN=0.0D0
      GBEN=0.0D0
      GO TO 350 
  310 EVBEN=DEXP(VBE/VTE) 
      CBEN=C2     *(EVBEN-1.0D0)
      GBEN=C2     *EVBEN/VTE
      GO TO 350 
  320 GBE=-CSAT/VBE 
      CBE=GBE*VBE 
      GBEN=-C2/VBE
      CBEN=GBEN*VBE 
  350 IF (VBC.LE.-VT) GO TO 370 
      EVBC=DEXP(VBC/VT/VALUE(LOCM+9)) 
      CBC=CSAT*(EVBC-1.0D0) 
      GBC=CSAT*EVBC/VT/VALUE(LOCM+9)
      IF (C4.NE.0.0D0) GO TO 360
      CBCN=0.0D0
      GBCN=0.0D0
      GO TO 400 
  360 EVBCN=DEXP(VBC/VTC) 
      CBCN=C4     *(EVBCN-1.0D0)
      GBCN=C4     *EVBCN/VTC
      GO TO 400 
  370 GBC=-CSAT/VBC 
      CBC=GBC*VBC 
      GBCN=-C4/VBC
      CBCN=GBCN*VBC 
  400 Q1=1.0D0/(1.0D0-OVA*VBC-OVB*VBE)
      Q2=OIK*CBE+OIKR*CBC 
      SQARG=DSQRT(1.0D0+4.0D0*Q2) 
      QB=Q1*(1.0D0+SQARG)/2.0D0 
      DQB=(CBE-CBC)/(QB*QB) 
      SQARG=DSQRT(1.0D0+4.0D0*Q2) 
      DQ1=DQB*(1.0D0+SQARG)/2.0D0 
      DQ2=Q1*DQB/SQARG
C 
C  COMPUTE SENSITIVITIES
C 
C...  BF
C 
      SENS=-VABE*CBE/BF/BF
      SENSN=BF*SENS/100.0D0 
      WRITE (6,101) ALSBF,BF,SENS,SENSN 
C 
C...  JLE 
C 
      IF (C2.NE.0.0D0) GO TO 430
      WRITE (6,186) ALSC2 
      GO TO 440 
  430 SENS=VABE*CBEN/C2 
      SENSN=C2*SENS/100.0D0 
      WRITE (6,101) ALSC2,C2,SENS,SENSN 
C 
C...  BR
C 
  440 SENS=-VABC*CBC/BR/BR
      SENSN=BR*SENS/100.0D0 
      WRITE (6,101) ALSBR,BR,SENS,SENSN 
C 
C...  JLC 
C 
      IF (C4.NE.0.0D0) GO TO 450
      WRITE (6,186) ALSC4 
      GO TO 460 
  450 SENS=VABC*CBCN/C4 
      SENSN=C4*SENS/100.0D0 
      WRITE (6,101) ALSC4,C4,SENS,SENSN 
C 
C...  IS
C 
  460 SENS=(VABE*(CBE/BF)+VABC*(CBC/BR) 
     1   +VACE*(DQB*QB-DQ2*Q2))/CSAT
      SENSN=CSAT*SENS/100.0D0 
      WRITE (6,101) ALSJS,CSAT,SENS,SENSN 
C 
C...  NE
C 
      SENS=-VABE*GBEN*VBE/XNE 
      SENSN=XNE*SENS/100.0D0
      WRITE (6,101) ALSNE,XNE,SENS,SENSN
$PAGE 
C 
C...  NC
C 
      SENS=-VABC*GBCN*VBC/XNC 
      SENSN=XNC*SENS/100.0D0
      WRITE (6,101) ALSNC,XNC,SENS,SENSN
C 
C...  IK
C 
      IF (OIK.NE.0.0D0) GO TO 470 
      WRITE (6,186) ALSIK 
      GO TO 480 
  470 VAL=1.0D0/OIK 
      SENS=VACE*DQ2*CBE/(VAL*VAL) 
      SENSN=VAL*SENS/100.0D0
      WRITE (6,101) ALSIK,VAL,SENS,SENSN
C 
C...  IKR 
C 
  480 IF (OIKR.NE.0.0D0) GO TO 490
      WRITE (6,186) ALSIKR
      GO TO 500 
  490 VAL=1.0D0/OIKR
      SENS=VACE*DQ2*CBC/(VAL*VAL) 
      SENSN=VAL*SENS/100.0D0
      WRITE (6,101) ALSIKR,VAL,SENS,SENSN 
C 
C...  VA
C 
  500 IF (OVA.NE.0.0D0) GO TO 510 
      WRITE (6,186) ALSVA 
      GO TO 520 
  510 VA=1.0D0/OVA
      SENS=VACE*Q1*Q1*DQ1*VBC/(VA*VA) 
      SENSN=VA*SENS/100.0D0 
      WRITE (6,101) ALSVA,VA,SENS,SENSN 
C 
C...  VB
C 
  520 IF (OVB.NE.0.0D0) GO TO 530 
      WRITE (6,186) ALSVB 
      GO TO 540 
  530 VB=1.0D0/OVB
      SENS=VACE*Q1*Q1*DQ1*VBE/(VB*VB) 
      SENSN=VB*SENS/100.0D0 
      WRITE (6,101) ALSVB,VB,SENS,SENSN 
  540 LOC=NODPLC(LOC) 
      GO TO 220 
$PAGE 
C 
C  FINISHED 
C 
 1000 CONTINUE
      RETURN
      END 
$EMA /BLANK/                            
      SUBROUTINE SSTF 
     + ,92091-16006 REV.5000 <890418.1141>  
      IMPLICIT REAL*8 (A-H,O-Z) 
C 
C     THIS ROUTINE COMPUTES THE VALUE OF THE SMALL-SIGNAL TRANSFER
C FUNCTION SPECIFIED BY THE USER. 
C 
      COMMON /TABINF/ IELMNT,ISBCKT,NSBCKT,IUNSAT,NUNSAT,ITEMPS,NUMTEM, 
     1   ISENS,NSENS,IFOUR,NFOUR,IFIELD,ICODE,IDELIM,ICOLUM,INSIZE, 
     2   JUNODE,LSBKPT,NUMBKP,IORDER,JMNODE,IUR,IUC,ILC,ILR,NUMOFF,ISR, 
     3   NMOFFC,ISEQ,ISEQ1,NEQN,NODEVS,NDIAG,ISWAP,IEQUA,MACINS,LVNIM1, 
     4   LX0,LVN,LYNL,LYU,LYL,LX1,LX2,LX3,LX4,LX5,LX6,LX7,LD0,LD1,LTD,
     5   IMYNL,IMVN,LCVN,NSNOD,NSMAT,NSVAL,ICNOD,ICMAT,ICVAL, 
     6   LOUTPT,LPOL,LZER,IRSWPF,IRSWPR,ICSWPF,ICSWPR,IRPT,JCPT,
     7   IROWNO,JCOLNO,NTTBR,NTTAR,LVNTMP 
      COMMON /CIRDAT/ LOCATE(50),JELCNT(50),NUNODS,NCNODS,NUMNOD,NSTOP, 
     1   NUT,NLT,NXTRM,NDIST,NTLIN,IBR,NUMVS
      COMMON /FLAGS/ IPRNTA,IPRNTL,IPRNTM,IPRNTN,IPRNTO,LIMTIM,LIMPTS,
     1   LVLCOD,LVLTIM,ITL1,ITL2,ITL3,ITL4,ITL5,IGOOF,NOGO,KEOF 
      COMMON /DC/ TCSTAR(2),TCSTOP(2),TCINCR(2),ICVFLG,ITCELM(2),KSSOP, 
     1   KINEL,KIDIN,KOVAR,KIDOUT 
      COMMON /BLANK/ VALUE(64)
      INTEGER NODPLC(64)
      COMPLEX CVALUE(32)
      EQUIVALENCE (VALUE(1),NODPLC(1),CVALUE(1))
C 
      DIMENSION STRING(5),SAVE(3) 
      DATA ASLASH, ABLNK / 1H/, 1H  / 
C 
C  SETUP CURRENT VECTOR FOR INPUT RESISTANCE AND TRANSFER FUNCTION
C 
      CALL ZERO8(VALUE(LVN+1),NSTOP)
      IF (KIDIN.EQ.10) GO TO 5
C 
C...  VOLTAGE SOURCE INPUT
C 
      IPTRI=NODPLC(KINEL+6) 
      VALUE(LVN+IPTRI)=+1.0D0 
      GO TO 20
C 
C...  CURRENT SOURCE INPUT
C 
    5 NOPOSI=NODPLC(KINEL+2)
      NONEGI=NODPLC(KINEL+3)
      VALUE(LVN+NOPOSI)=-1.0D0
      VALUE(LVN+NONEGI)=+1.0D0
$PAGE 
C 
C  LU DECOMPOSE AND SOLVE THE SYSTEM OF CIRCUIT EQUATIONS 
C 
C...  REORDER THE RIGHT-HAND SIDE 
C 
   20 CALL DCDCMP 
      CALL DCSOL
      VALUE(LVN+1)=0.0D0
      DO 25 I=1,NSTOP 
      J=NODPLC(ICSWPR+I)
      K=NODPLC(IRSWPF+J)
      VALUE(LVNTMP+I)=VALUE(LVN+K)
   25 CONTINUE
      CALL COPY8(VALUE(LVNTMP+1),VALUE(LVN+1),NSTOP)
C 
C  EVALUATE TRANSFER FUNCTION 
C 
      IF (NODPLC(KOVAR+5).NE.0) GO TO 30
C 
C...  VOLTAGE OUTPUT
C 
      NOPOSO=NODPLC(KOVAR+2)
      NONEGO=NODPLC(KOVAR+3)
      TRFN=VALUE(LVN+NOPOSO)-VALUE(LVN+NONEGO)
      GO TO 40
C 
C...  CURRENT OUTPUT (THROUGH VOLTAGE SOURCE) 
C 
   30 IPTRO=NODPLC(KOVAR+2) 
      IPTRO=NODPLC(IPTRO+6) 
      TRFN=VALUE(LVN+IPTRO) 
C 
C  EVALUATE INPUT RESISTANCE
C 
   40 IF (KIDIN.EQ.9) GO TO 50
C 
C...  CURRENT SOURCE INPUT
C 
      ZIN=VALUE(LVN+NONEGI)-VALUE(LVN+NOPOSI) 
      GO TO 70
C 
C...  VOLTAGE SOURCE INPUT
C 
   50 CREAL=VALUE(LVN+IPTRI)
      IF (DABS(CREAL).GE.1.0D-20) GO TO 60
      ZIN=1.0D20
      GO TO 70
   60 ZIN=-1.0D0/CREAL
C 
C  SETUP CURRENT VECTOR FOR OUTPUT RESISTANCE 
C 
   70 CALL ZERO8(VALUE(LVN+1),NSTOP)
      IF (NODPLC(KOVAR+5).NE.0) GO TO 80
$PAGE 
C 
C...  VOLTAGE OUTPUT
C 
      VALUE(LVN+NOPOSO)=-1.0D0
      VALUE(LVN+NONEGO)=+1.0D0
      GO TO 90
   80 IF (NODPLC(KOVAR+2).NE.KINEL) GO TO 85
      ZOUT=ZIN
      GO TO 200 
C 
C...  CURRENT OUTPUT (THROUGH VOLTAGE SOURCE) 
C 
   85 VALUE(LVN+IPTRO)=+1.0D0 
C 
C  PERFORM NEW FORWARD AND BACKWARD SUBSTITUTION
C 
C...  REORDER THE RIGHT-HAND SIDE 
C 
   90 CALL DCSOL
      VALUE(LVN+1)=0.0D0
      DO 95 I=1,NSTOP 
      J=NODPLC(ICSWPR+I)
      K=NODPLC(IRSWPF+J)
      VALUE(LVNTMP+I)=VALUE(LVN+K)
   95 CONTINUE
      CALL COPY8(VALUE(LVNTMP+1),VALUE(LVN+1),NSTOP)
C 
C  EVALUATE OUTPUT RESISTANCE 
C 
  100 IF (NODPLC(KOVAR+5).NE.0) GO TO 110 
C 
C...  VOLTAGE OUTPUT
C 
      ZOUT=VALUE(LVN+NONEGO)-VALUE(LVN+NOPOSO)
      GO TO 200 
C 
C...  CURRENT OUTPUT (THROUGH VOLTAGE SOURCE) 
C 
  110 CREAL=VALUE(LVN+IPTRO)
      IF (DABS(CREAL).GE.1.0D-20) GO TO 120 
      ZOUT=1.0D20 
      GO TO 200 
  120 ZOUT=-1.0D0/CREAL 
$PAGE 
C 
C  PRINT RESULTS
C 
  200 DO 210 I=1,5
      STRING(I)=ABLNK 
  210 CONTINUE
      IPOS=1
      CALL OUTNAM(KOVAR,1,STRING,IPOS)
      CALL COPY8(STRING,SAVE,3) 
      CALL MOVE(STRING,IPOS,ASLASH,1,1) 
      IPOS=IPOS+1 
      LOCV=NODPLC(KINEL+1)
      ANAM=VALUE(LOCV)
      CALL MOVE(STRING,IPOS,ANAM,1,8) 
      WRITE (6,231) STRING,TRFN,ANAM,ZIN,SAVE,ZOUT
  231 FORMAT(////,'0****     SMALL-SIGNAL CHARACTERISTICS'//, 
     1   1H0,5X,5A8,3H = ,1PD10.3,/,
     2   1H0,5X,'INPUT RESISTANCE AT ',A8,12X,3H = ,D10.3,/,
     3   1H0,5X,'OUTPUT RESISTANCE AT ',2A8,A3,3H = ,D10.3) 
      RETURN
      END 
