From: utzoo!decvax!ucbvax!info-vax Newsgroups: fa.info-vax Title: SPICE2 PROBLEM! Article-I.D.: ucbvax.230 Posted: Sun Dec 5 08:57:43 1982 Received: Mon Dec 6 03:49:32 1982 >From Fathi.ES@PARC-MAXC Sun Dec 5 08:54:48 1982 Mail-From: ARPANET host PARC-MAXC rcvd at 3-Dec-82 1659-PST To: INFO-VAX@SRI-CSL Cc: es@Fathi, es@BKAO Remailed-Date: 4 Dec 1982 1047-PST Remailed-From: the tty of Geoffrey S. Goodfellow Remailed-To: Info-VAX@SRI-CSL: ; **** SPICE2G5 AC ANALYSIS BUG *** While running the latest version of SPICE2 (G5), we noticed that for the ac analysis KCL is violated. As we know, a MOS transistor is a 4 terminal device, which the algebraic sum of currents at Drain, Gate, Source and Bulk (Substrate) should be zero. 1. This problem only exists in AC analysis (DC and Transient produce correct results) 2. On the previous version of SPICE2 (version D) the AC analysis is correct and KCL is not violated. (Please note that the capacitance model on SPICE2G5 is Meyer's model which indeed is different from SPICE2D). 3. I have used the equivalent linearized, small-signal MOSFET model in place of the tested transistor, and again KCL was correct. I heard from different sources that Berkeley knows about this bug and they have already fixed it.!! Does anyone out there knows about these changes (They should be in overlay ACAN and in routine ACLOAD were the complex coefficient matrix is loaded) , or where I can get a copy of Berkeley's enhancements. I will appreciate any help or suggestions . Thanks, Nader Fathi Fathi.ES at PARC-MAXC VLSI CAD Development Xerox Corporation, MS A1-85 701 S. Aviation Blvd. El Segundo, CA 90245 The following SPICE2 run demonstrates such bug : 1*******11-NOV-82 ******* SPICE 2G.5 (10AUG81) *******12:28:34***** 0THIS IS THE KCL TEST 0**** INPUT LISTING TEMPERATURE = 27.000 DEG C 0******************************************************************* **** .WIDTH OUT = 72 IIN 0 7 AC 1 * *... THESE ARE DUMMY VOLTAGE SOURCES TO MEASURE CURRENTS * VG 7 1 0 VD 2 4 0 VS 3 4 0 VB 6 0 0 VE 4 5 0 R 7 0 1G * *... A VOLTAGE CONTROL VOLTAGE SOURCE WITH GAIN OF 1000 * E1 5 0 7 0 -1000 * *... AND HERE COMES THE TRANSISTOR AS A 4 TERMINAL DEVICE * M1 2 1 3 6 ENH W=70U L=120U .MODEL ENH NMOS (LEVEL=2 NSUB=3E15 TOX=0.1375U UEXP=0.36 + NSS=4E10 LD=0.1N XJ=1U CGSO=2.125E-10 CGDO=2.125E-10) * *... AS KCL STATES: * A. I(VE)=I(VD)+I(VS) * B. 1.0 AMP + I(VB) = I(VE) .PRINT AC I(VG),I(VD),I(VS),I(VE),I(VB) .AC DEC 10 10K 200K .END 1*******11-NOV-82 ******* SPICE 2G.5 (10AUG81) *******12:28:34***** 0THIS IS THE KCL TEST 0**** MOSFET MODEL PARAMETERS TEMPERATURE = 27.000 DEG C 0******************************************************************* **** ENH 0TYPE NMOS 0LEVEL 2.000 0VTO 0.504 0KP 1.51D-05 0GAMMA 1.257 0PHI 0.633 0CGSO 2.12D-10 0CGDO 2.12D-10 0CJ 1.76D-04 0TOX 1.38D-07 0NSUB 3.00D+15 0NSS 4.00D+10 0TPG 1.000 0XJ 1.00D-06 0LD 1.00D-10 0UO 600.000 0UEXP 0.360 1*******11-NOV-82 ******* SPICE 2G.5 (10AUG81) *******12:28:34***** 0THIS IS THE KCL TEST 0**** SMALL SIGNAL BIAS SOLUTION TEMPERATURE = 27.000 DEG C 0******************************************************************* **** NODE VOLTAGE NODE VOLTAGE NODE VOLTAGE NODE VOLTAGE ( 1) 0.0000 ( 2) 0.0000 ( 3) 0.0000 ( 4) 0.0000 ( 5) 0.0000 ( 6) 0.0000 ( 7) 0.0000 VOLTAGE SOURCE CURRENTS NAME CURRENT VG 0.000D+00 VD 0.000D+00 VS 0.000D+00 VB 0.000D+00 VE 0.000D+00 TOTAL POWER DISSIPATION 0.00D+00 WATTS 1*******11-NOV-82 ******* SPICE 2G.5 (10AUG81) *******12:28:34***** 0THIS IS THE KCL TEST 0**** OPERATING POINT INFORMATION TEMPERATURE = 27.000 DEG C 0******************************************************************* **** 0 0**** VOLTAGE-CONTROLLED VOLTAGE SOURCES 0 E1 V-SOURCE 0.000 I-SOURCE 0.00E+00 0 0**** MOSFETS 0 M1 0MODEL ENH ID 0.00E+00 VGS 0.000 VDS 0.000 VBS 0.000 VTH 0.500 VDSAT 0.000 GM 0.00E+00 GDS 0.00E+00 GMB 0.00E+00 CBD 0.00E+00 CBS 0.00E+00 CGSOVL 1.49E-14 CGDOVL 1.49E-14 CGBOVL 0.00E+00 CGS 0.00E+00 CGD 0.00E+00 CGB 1.67E-12 1*******11-NOV-82 ******* SPICE 2G.5 (10AUG81) *******12:28:34***** 0THIS IS THE KCL TEST 0**** AC ANALYSIS TEMPERATURE = 27.000 DEG C 0******************************************************************* **** FREQ I(VG) I(VD) I(VS) I(VE) I(VB) X 1.000E+04 1.000E+00 8.848E-03 8.848E-03 1.770E-02 9.905E-04 1.259E+04 1.000E+00 8.848E-03 8.848E-03 1.770E-02 9.904E-04 1.585E+04 1.000E+00 8.848E-03 8.848E-03 1.770E-02 9.903E-04 1.995E+04 1.000E+00 8.848E-03 8.848E-03 1.770E-02 9.902E-04 2.512E+04 1.000E+00 8.848E-03 8.848E-03 1.770E-02 9.902E-04 3.162E+04 1.000E+00 8.848E-03 8.848E-03 1.770E-02 9.902E-04 3.981E+04 1.000E+00 8.848E-03 8.848E-03 1.770E-02 9.902E-04 5.012E+04 1.000E+00 8.848E-03 8.848E-03 1.770E-02 9.902E-04 6.310E+04 1.000E+00 8.848E-03 8.848E-03 1.770E-02 9.902E-04 7.943E+04 1.000E+00 8.848E-03 8.848E-03 1.770E-02 9.902E-04 1.000E+05 1.000E+00 8.848E-03 8.848E-03 1.770E-02 9.902E-04 1.259E+05 1.000E+00 8.848E-03 8.848E-03 1.770E-02 9.902E-04 1.585E+05 1.000E+00 8.848E-03 8.848E-03 1.770E-02 9.902E-04 1.995E+05 1.000E+00 8.848E-03 8.848E-03 1.770E-02 9.902E-04 2.512E+05 1.000E+00 8.848E-03 8.848E-03 1.770E-02 9.902E-04 This circuit measures the current at all these 4 nodes so that: 1.0 Amp+I(VB) = I(VE)=I(VD)+I(VS)=2*I(VD)=2*I(VS) but we can see that : I(VB)=9.9E-4, I(VE)=1.77E-2 so 1+9.9E-4 is not equal to 1.77E-2 (PROBLEM !!?) Observations: 1. This problem only exists in AC analysis (DC and Transient produce correct results) 2. On the previous version of SPICE2 (version D) the AC analysis is correct and KCL is not violated. (Please note that the capacitance model on SPICE2G5 is Meyer's model which indeed is different from SPICE2D). 3. I have used the equivalent linearized, small-signal MOSFET model in place of the tested transistor, and again KCL was correct. I heard from different sources that Berkeley knows about this bug and they have already fixed it.!! Does anyone out there knows about these changes (They should be in overlay ACAN and in routine ACLOAD were the complex coefficient matrix is loaded) , or where I can get a copy of Berkeley's enhancements. I will appreciate any help or suggestions . Thanks, Nader Fathi Fathi.ES at PARC-MAXC VLSI CAD Development Xerox Corporation, MS A1-85 701 S. Aviation Blvd. El Segundo, CA 90245